Support for gevent in ptvsd
See original GitHub issueCurrently ptvsd cannot run in a gevent/greenlet script, it just hungs:
from gevent import monkey
monkey.patch_all()
import ptvsd
ptvsd.enable_attach("test", address=('0.0.0.0', 3000))
ptvsd.wait_for_attach()
ptvsd.break_into_debugger()
It would be great if we could debug gevent apps.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Developers - Support for gevent in ptvsd -
Currently ptvsd cannot run in a gevent/greenlet script, it just hungs: from gevent import monkey monkey.patch_all() import ptvsd ptvsd.enable_attach("test", ...
Read more >Debugging configurations for Python apps in ...
The Python extension supports debugging of several types of Python applications. ... If set to true , enables debugging of gevent monkey-patched code....
Read more >How does one use the VSCode debugger to debug a ...
Add the following code into your routerservice_config.py (or similar python startup file) import ptvsd ptvsd.enable_attach("my_secret", ...
Read more >Visual Code debug requirement GEVENT_SUPPORT=True
I was asked to create a global variable GEVENT_SUPPORT=True. Is gevent a mandatory requirement ... to enable gevent support in the debugger.
Read more >Remotely debug a Python app inside a Docker container in ...
Visual Studio Code supports ptvsd 4 now! ... -p '*.py' -R -- celery -A app:celery worker --pid= -P gevent --without-gossip ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this script should work for most users, cheers.
I found this: https://github.com/Microsoft/vscode-python/issues/127
Adding
"gevent": true
to my launch config made it work again! (with the layzerar’s workaround still applied)