Skip to content

Commit

Permalink
Merge pull request #370 from MannLabs/add_debug_instructions
Browse files Browse the repository at this point in the history
add notes how to debug with vscode
  • Loading branch information
mschwoer authored Nov 14, 2024
2 parents 2a31f7b + 9256428 commit 27edc96
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion docs/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,39 @@ This package uses a shared release process defined in the

## Notes for developers
### Debugging
To debug e2e tests with PyCharm:
A good start for debugging is this notebook: `nvs/debug/debug_lvl1.ipynb`

##### Debug e2e tests with PyCharm
1. Create a "Run/Debug configuration" with
- "module": `alphadia.cli`
- "script parameters": `--config /abs/path/to/tests/e2e_tests/basic/config.yaml`
- "working directory": `/abs/path/to/tests/e2e_tests`
2. Uncomment the lines following the `uncomment for debugging` comment in `alphadia/cli.py`.
3. Run the configuration.

##### Debug e2e tests with VS Code
1. Create the following debug configuration (`launch.json`, see [here](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations)):
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File with Arguments",
"type": "debugpy",
"request": "launch",
"cwd": "/abs/path/to/tests/e2e_tests",
"program": "../../alphadia/cli.py",
"console": "integratedTerminal",
"args": [
"--config", "/abs/path/to/tests/e2e_tests/basic/config.yaml"
]
}
]
}
```
2. Uncomment the lines following the `uncomment for debugging` comment in `alphadia/cli.py`.
3. Run the configuration.


### pre-commit hooks
It is highly recommended to use the provided pre-commit hooks, as the CI pipeline enforces all checks therein to
Expand Down

0 comments on commit 27edc96

Please sign in to comment.