Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
Debugging Galaxyļ
Debugging Galaxy in VS Codeļ
The following instructions assume that you have cloned your Galaxy fork into the
~/galaxy
directory and have created a VS Code workspace per instructions
here. Additionally, we assume you have configured
Galaxy and are using ~/galaxy/config/galaxy.yml
as your galaxy configuration
file (so, not the default .sample). If you are still using the default
configuration, simply cp config/galaxy.yml.sample config/galaxy.yml
and it
should work fine.
Add the following code snippet to
~/galaxy/.vscode/launch.json
(create the file if it does not already exist):{ "version": "0.2.0", "configurations": [ { "name": "Python: Current File (Integrated Terminal)", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal" }, { "name": "GalaxyFastAPI uvicorn", "type": "python", "request": "launch", "module": "uvicorn", "args": ["--app-dir", "lib", "--factory", "galaxy.webapps.galaxy.fast_factory:factory"], "env": { "GALAXY_CONFIG_FILE": "${workspaceFolder}/config/galaxy.yml" } }, ] }
Re-start VS Code
Add a breakpoint somewhere in your code
Select Run and Debug on Activity Bar, on the far left hand side. In the RUN AND DEBUG drop down, select
GalaxyFastAPI uvicorn
, and click the Start Debugging button (green arrow)Galaxy should stop right on the break point you added.
Enjoy your debugging session :-)