mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-05 15:31:14 +00:00
Add more samples for correct debug configurations
This commit is contained in:
BIN
docs/assets/pycharm_debug.png
Normal file
BIN
docs/assets/pycharm_debug.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -77,7 +77,7 @@ def test_method_to_test(caplog):
|
|||||||
|
|
||||||
### Debug configuration
|
### 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.
|
Details will obviously vary between setups - but this should work to get you started.
|
||||||
|
|
||||||
``` json
|
``` 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".
|
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.
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
!!! Note "Startup directory"
|
!!! 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).
|
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).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user