This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Add Python remote debugger for Visual Studio Code #76
Draft
thinkh
wants to merge
9
commits into
develop
Choose a base branch
from
thinkh/python-remote-debugger
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
ghost
requested a review
from puehringer
August 21, 2019 05:40
thinkh
added a commit
to phovea/generator-phovea
that referenced
this pull request
Aug 22, 2019
Adds the Python debugger for Visual Studio Code. Requires a phovea_server version with merged PR phovea/phovea_server#76.
If this line is active logs from the launch.py are not shown after loading this file. Disabling this line solves the problem and all logs are shown.
There is still a problem when using the debugger and the reloader at the same time. Usually the server is started twice, due to the werkzeug reloader:
When activating the debugger the server exists when starting the second time:
Error:
Following this error it must be the combination of ptvsd debugger, gevent, and werkzeug reloader. So far I could not find any solution for this problem. The current workaround is to disable the reloader and start the if args.use_reloader:
_log.info('start application using reloader...')
# from werkzeug._reloader import run_with_reloader
# run_with_reloader(main, extra_files=_config_files())
main()
else:
_log.info('start application...')
main() Note that the server will not restart once a file has been changed. |
rumersdorfer
added
type: feature
New feature or request
and removed
Type: Enhancement
labels
Nov 19, 2019
thinkh
added a commit
that referenced
this pull request
Dec 12, 2019
Removed because the debugger does not seem to work with our server startup process. For further information see #76.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the Python Tools for the Visual Studio Debugger (short: ptvsd) to phovea_server and let's you debug Python code within Visual Studio Code.
Related PR: phovea/generator-phovea#166
How to start the debugger
yo phovea:update
to update the requirements_dev.txt and docker-compose-debug.ymldocker-compose build api
docker-compose up
will not work here!Stop debugging
Ctrl + C
.Links
Useful links when implementing this feature: