diff --git a/doc/source/dev/debugging_tests.md b/doc/source/dev/debugging_tests.md index 97c27cb120e..781464c049d 100644 --- a/doc/source/dev/debugging_tests.md +++ b/doc/source/dev/debugging_tests.md @@ -5,6 +5,7 @@ The following instructions assume that you have cloned your Galaxy fork into ~/galaxy directory. 1. Start VS Code +2. Install the Python extension for VS Code: select Extensions on Activity Bar, on the far left hand side 2. Create a VS Code workspace by selecting 'File -> Add Folder to Workspace...' from menu and adding the `~/galaxy` directory 3. Optionally, save the workspace by selecting 'File -> Save Workspace As...' and save as 'galaxy.code-workspace' in the `~/galaxy` directory 2. Add the following snippet to `~/galaxy/.vscode/settings.json` (create the file if it does not already exist) @@ -25,6 +26,8 @@ The following instructions assume that you have cloned your Galaxy fork into ~/g } ``` 3. Re-start VS Code +3. Choose the .venv Python as your Python Interpreter. First `Ctrl+Shift+P` then `>Python: Select Interpreter`. ++![VS Code Python Interpreter](select_python_interpreter.png) 4. Select Test on Activity Bar, on the far left hand side. You should see unit and integration tests under 'Python' (as shown in the image below). It may take a few seconds for the tests to load up. If they do not, click the 'Discover Tests' icon and wait for the tests to load. ![VS Code Tests](tests.png) 5. Expand integration/unit tests, select a test to display its source code in editor, add a breakpoint, and start the debugger by clicking on the debug icon (next to test name) diff --git a/doc/source/dev/select_python_interpreter.png b/doc/source/dev/select_python_interpreter.png new file mode 100644 index 00000000000..a1a071f24a2 Binary files /dev/null and b/doc/source/dev/select_python_interpreter.png differ