-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap ptvsd for debugpy, ptvsd deprecated #4115 #4322
Conversation
From my previous config, I simply:
My VScode setup remained identical. Thanks! |
I think users should be able to disable debugging if they don't want to use it for whatever reason (performance, overhead, ...) |
Yea, I think this was the reason we kept the 2 separate for a long time. Might need something fancier to handle variables and keep it flexible. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @valentijnscholten mentioned, we'd need a way to control whether or not we want debugpy active or not and based on that, be able to run multi-process and multi-thread (which indeed is troublesome when wanting to attach a debugger).
a1e951c
to
93db55b
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
@valentijnscholten I changed the dev entrypoint to override the default if DD_DEBUG is set. I also added back the debug profile (with its docker-compose override) |
I'll give this a spin in the following days. Looks good at first sight though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump the version with a minor in Chart.yml to pass the linting.
To be on the safe side, quickly rebase too.
Cheers :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some minor rename comment and also pin the version for debugpy
@madchap it's better to only rerun the failed tests instead of closing/reopening and running all tests again. |
Co-authored-by: Damien Carol <damien.carol@gmail.com>
Co-authored-by: Damien Carol <damien.carol@gmail.com>
as discussed on slack need to dismiss this to be able to merge
…4322) * Merging ptvsd into dev profile * Documentation minor update and script cleanup * Updating helm charts to remove mentioned of ptvsd * Updating docker documentation * Adding comments in code * pep8 fixes * Update docker-compose dev to get port from env * Keeping debug profile, with same entrypoint as dev * Documentation adjustments * Setting variable in helmchart to enable debug * Final docs changes * Update helm/defectdojo/templates/django-deployment.yaml Co-authored-by: Damien Carol <damien.carol@gmail.com> * Update requirements.txt Co-authored-by: Damien Carol <damien.carol@gmail.com> * Bump chart version, and rename value * Rebasing from dev * pep8 fixes * Rebasing Co-authored-by: Damien Carol <damien.carol@gmail.com>
…4322) * Merging ptvsd into dev profile * Documentation minor update and script cleanup * Updating helm charts to remove mentioned of ptvsd * Updating docker documentation * Adding comments in code * pep8 fixes * Update docker-compose dev to get port from env * Keeping debug profile, with same entrypoint as dev * Documentation adjustments * Setting variable in helmchart to enable debug * Final docs changes * Update helm/defectdojo/templates/django-deployment.yaml Co-authored-by: Damien Carol <damien.carol@gmail.com> * Update requirements.txt Co-authored-by: Damien Carol <damien.carol@gmail.com> * Bump chart version, and rename value * Rebasing from dev * pep8 fixes * Rebasing Co-authored-by: Damien Carol <damien.carol@gmail.com>
Trying to move to debugpy in replacement of ptvsd. fixes #4115
Changed a few things:
DD_DEBUG_PORT
to provide a custom port number for the debugging serverDD_DEBUG_WAIT_FOR_CLIENT
pauses the execution until the debugging client is connected (doesn't work in multiprocess or multithreaded with uwsgi)Tested debugging, managed to consistently hit breakpoints, inspect variables, etc...