Description
From @underyx on June 5, 2017 10:27
Environment data
VS Code version: 1.12.2
Python Extension version: 0.6.4
Python Version: 2.7.13
OS and version: macOS Sierra
Actual behavior
Running apps that use gevent/eventlet/greenlet/green threads/etc. with the debugger active causes the app to just freeze early on. This is the same behavior that I see when I run the same app with the PyCharm debugger with its 'Gevent compatible' switch turned off.
Expected behavior
They should work just like synchronous apps. In PyCharm, there's an option for this called 'Gevent compatible' on the debugger settings page, that sounds like a reasonable thing to have here as well.
Steps to reproduce:
- Take any Python application.
pip install gevent
.- Add
from gevent import monkey; monkey.patch_all()
in the app's__init__.py
. - Try to run it with the debugger.
Settings
Your launch.json (if dealing with debugger issues):
{
"name": "my api",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "env/bin/gunicorn",
"args": [
"--config=.misc/gunicorn_config.py",
"--reload",
"myapi"
],
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
``
Your settings.json:
```json
{
"python.pythonPath": "env/bin/python"
}
Logs
Output from Python
output panel
(empty)
Output from Console window
(Help->Developer Tools menu)
(empty)
Edit: oh wow, 1000! 🎊
Copied from original issue: DonJayamanne/pythonVSCode#1000