-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some info on how to do remote debugging with Visual Studio Code (#…
…192)
- Loading branch information
Omer Lachish
authored
Feb 11, 2019
1 parent
fe45e15
commit 95acb31
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
category: dev-guide | ||
parent_category: open-source | ||
title: Debugging a Redash Server on Docker Using Visual Studio Code | ||
slug: debugging | ||
--- | ||
|
||
If you've followed [Docker Based Developer Installation Guide]({% link _kb/open-source/dev-guide/docker.md %}), your Redash server is running inside a Docker container and cannot be debugged directly. If you wish to debug server code, you will need to use remote debugging. | ||
|
||
## Initial Setup | ||
1. Make sure you have the [Python Extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-python.python) installed. | ||
2. Install ptvsd: `pip install ptvsd` | ||
|
||
## Starting a Debugging Session | ||
1. In a terminal window, run `docker-compose stop server && docker-compose run --rm --service-ports server debug && docker-compose start server` | ||
2. Switch over to Visual Studio Code and select "View -> Debug" | ||
3. Select the "Python: Remote Attach" configuration | ||
4. Start debugging (F5) | ||
|
||
## Notes | ||
* Once you hit Ctrl+C, the regular development server (with autoreload) will relaunch. | ||
* Code reloading is not supported during a debugging session, so if you'd like to make changes, hit Ctrl+C in the terminal and restart from step 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters