diff --git a/docs/assets/pycharm_debug.png b/docs/assets/pycharm_debug.png new file mode 100644 index 000000000..b1c19ca93 Binary files /dev/null and b/docs/assets/pycharm_debug.png differ diff --git a/docs/developer.md b/docs/developer.md index 4784e5352..9c2052e4f 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -77,7 +77,7 @@ def test_method_to_test(caplog): ### Debug configuration -To debug freqtrade, we recommend VSCode with the following launch configuration (located in `.vscode/launch.json`). +To debug freqtrade, we recommend VSCode (with the Python extension) with the following launch configuration (located in `.vscode/launch.json`). Details will obviously vary between setups - but this should work to get you started. ``` json @@ -102,6 +102,20 @@ This method can also be used to debug a strategy, by setting the breakpoints wit A similar setup can also be taken for Pycharm - using `freqtrade` as module name, and setting the command line arguments as "parameters". +??? Tip "Correct venv usage" + When using a virtual environment (which you should), make sure that your Editor is using the correct virtual environment to avoid problems or "unknown import" errors. + + #### Vscode + + You can select the correct environment in VSCode with the command "Python: Select Interpreter" - which will show you environments the extension detected. + If your environment has not been detected, you can also pick a path manually. + + #### Pycharm + + In pycharm, you can select the appropriate Environment in the "Run/Debug Configurations" window. + ![Pycharm debug configuration](assets/pycharm_debug.png) + ![Alt text](image.png) + !!! Note "Startup directory" This assumes that you have the repository checked out, and the editor is started at the repository root level (so setup.py is at the top level of your repository).