Using debugger on B2SHARE#
B2SHARE app image is built with debugpy installed. All commands are meant to be run in inveniordm_deployment folder.
Debugger in the container#
The B2SHARE deployment by default does not run the application in debug mode. To run the application with debugpy, modify the docker-compose.full.yml file with debug ini command files and expose debugpy ports:
web-ui:
...
- command: ["uwsgi /opt/invenio/var/instance/uwsgi_ui.ini"]
+ command: ["uwsgi /opt/invenio/var/instance/uwsgi_ui_debug.ini"]
...
expose:
- "5000"
+ - "56781"
web-api:
...
- command: ["uwsgi /opt/invenio/var/instance/uwsgi_rest.ini"]
+ command: ["uwsgi /opt/invenio/var/instance/uwsgi_rest_debug.ini"]
...
expose:
- "5000"
+ - "56782"
Run the docker compose stack:
docker compose -f docker-compose.full.yml up -d
Use Visual Studio code to debug#
The B2SHARE repo has a default .vscode/launch.json which has configuration to attach Visual Studio code debugger to the running containers. The launch.json has path mappings for Invenio modules, but the local path is in .gitignore to keep the repo clean. To get the modules to correct path, run:
docker ps
# Get id of web-api/web-ui container
docker cp <container-id>:/usr/local/lib/python3.12/site-packages/ ./devmounts/site-packages/
Last update : 11.09.2026
Last review : 11.09.2026