-
Notifications
You must be signed in to change notification settings - Fork 137
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
Support gevent with frame eval mode #189
Comments
Try this workaround and see if it helps: os.environ["PYDEVD_USE_FRAME_EVAL"] = "NO" |
It does the trick! What is the impact of having both environment variables always set (besides the overhead of importing the libraries again to protect them from patching by external libraries)? |
@fabioz can answer that better. He is currently on vacation and will be back in a couple of days. |
It seems to work fine on:
And:
|
Using |
I'm reopening as we should address the actual error when working with frame eval and gevent (or disable the frame eval mode ourselves when gevent mode is enabled if it turns out to be too complicated). |
The actual error reported here seems to be fixed already (I tried in a number of configurations and it seems to work well). Still, while testing I found a different issue which I'm investigating. i.e.: Doing a remote attach with a gevent.monkey.patch_all() is not working. Using the code below:
gives the following error:
|
Note: add a |
Note: verify if debugging works properly if |
I've investigated more on Just for some background on how things work in the event and the workarounds in the debugger:
Given that, the current workaround done in the debugger is the following: When loading the modules which will be affected by This is done at load time because afterwards all the other modules in So, to overcome this limitation, the other feasible approach which I see is not relying on the standard library at all (so, for instance, the debugger wouldn't be able rely on the Note that with this approach we probably wouldn't need the |
It would be nice to add a simple example on adding the enable_attach flag to gevent, those post don't provide any real help 👎 |
The enable attach should work in gevent provided you have a Note that the latest gevent broke the debugger, so, you must pin to a previous version (the last supported version is |
Environment data
Actual behavior
The code unexpectedly exits when I set the GEVENT_SUPPORT environment variable to True. Getting the following error:
The error happens when I press the "Start Debugging" button on VS Code.
Enabling gevent support because I want to debug some code that uses socketio.
Expected behavior
This used to work fine with PTVSD 4.2.10.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: