Skip to content
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

Debugger don't stop at the selected points when GEVENT_SUPPORT=true #749

Closed
romi477 opened this issue Oct 8, 2021 · 9 comments
Closed

Comments

@romi477
Copy link

romi477 commented Oct 8, 2021

Environment data

Version: 1.61.0
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Extension version Python: v2021.10.1317843341
Extension version Pylance: v2021.10.0
Date: 2021-10-07T18:11:02.929Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.4.0-87-generic

Actual behavior

Debugger don't stop on the points when GEVENT_SUPPORT=true

My web framework (Odoo) based on Werkzeug wsgi server runs with "workers". It requires GEVENT_SUPPORT=true option
that vscode hints me. But in this "GEVENT" mode my debugger don't stop at the selected points.

In GEVENT_SUPPORT=false and workers_count=1 everything is OK, debugger stops without any problem.

@romi477 romi477 changed the title Debugget don't on the points when GEVENT_SUPPORT=true Debugger don't stop at the selected points when GEVENT_SUPPORT=true Oct 8, 2021
@int19h
Copy link
Contributor

int19h commented Oct 13, 2021

There's a known issue with latest gevent versions: #515

Can you try it with an older version, and see if that helps?

@romi477
Copy link
Author

romi477 commented Oct 15, 2021

Yes i can, but... I don't wanna use any old version. There were also many other bugs in previous versions and i don't wanna "fight" with them. So, i'm using VSCode just one months after the several years on PyCharm and such bugs like that really upset me...

@fabioz
Copy link
Collaborator

fabioz commented Oct 15, 2021

@romi477 which Python version/gevent version are you currently using?

i.e.: we do have an open issue related to supporting newer gevent versions (#515), as gevent unfortunately broke the debugger with some of its newer changes (the fix isn't straightforward, but this is something which we're already thinking about addressing), so, if you are using a newer version of gevent, this would be a duplicate of #515, but if you're using a supported version, this would be something else...

@romi477
Copy link
Author

romi477 commented Oct 19, 2021

My framework uses python library gevent==1.1.2

@judej
Copy link

judej commented Oct 20, 2021

Thanks for the report, gevent 1.1.2 is 2016. The version that is working without issues is 20.9.0. Are you able to upgrade to that? We are seeing issues with older versions.

@judej judej added this to the Dev 17.x milestone Oct 20, 2021
@romi477
Copy link
Author

romi477 commented Oct 23, 2021

I'll consider it, but... my framework has its requrements and it's gevent==1.1.2 In addition PyCharm (by JetBrains) has no any troubles with this gevent version. I'm just saying that it's VsCode fault (as far as i understand).

@fabioz
Copy link
Collaborator

fabioz commented Dec 2, 2021

I can't really reproduce this.

In a simple example with something as:

import gevent

def foo():
    print('Running in foo')
    gevent.sleep(0)
    print('Explicit context switch to foo again')

def bar():
    print('Explicit context to bar')
    gevent.sleep(0)
    print('Implicit context switch back to bar')

lst = [
    gevent.spawn(foo),
    gevent.spawn(bar),
]

gevent.joinall(lst)

Adding breakpoints in bar and foo do stop properly for me even with gevent==1.1.2, so, it may be something else... what's the greenlet version you have there?

@fabioz
Copy link
Collaborator

fabioz commented Jan 28, 2022

I'm closing this since there wasn't additional feedback (besides, there aren't any other reports from gevent users and I couldn't reproduce this).

@fabioz fabioz closed this as completed Jan 28, 2022
@jeffery9
Copy link

#1206
#1277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants