Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Stepping in multi-threaded case should continue other threads #1372

Closed
karthiknadig opened this issue Apr 18, 2019 · 3 comments
Closed

Stepping in multi-threaded case should continue other threads #1372

karthiknadig opened this issue Apr 18, 2019 · 3 comments
Assignees

Comments

@karthiknadig
Copy link
Member

karthiknadig commented Apr 18, 2019

Current behavior: Stepping steps current thread but keeps the other threads paused. This should be optional behavior, enabled via a setting (temporarily). We plan on deprecating this behavior.

Expected Default behavior: Stepping steps in the current thread, and it should continue(resume) other threads. At the end of the steeping action in the current thread all threads are paused. This is the default behavior for C#, and expected and only behavior supported by VS.

Note that Pause, breakpoint, exception, etc should pause all threads.

@fabioz fabioz self-assigned this Jun 11, 2019
@fabioz
Copy link
Contributor

fabioz commented Jun 11, 2019

I think it should be straightforward to do this in pydevd...

Should the user set this in the launch configuration debugOptions or should this be set internally (in on_setdebuggerproperty_request) -- or can we just do that when multiThreadsSingleNotification is set in on_setdebuggerproperty_request (which is already done)?

@karthiknadig
Copy link
Member Author

we plan on deprecating debugOptions as well. All settings should happen via the launch json. So, i think this would also be a setting passed via launch json. This is how i expect IDE to pass this setting to us. This way the extension can basically indicate that this behavior setting will be deprecated. Either by making the setting private or by providing a warning. /cc @DonJayamanne

As for how the debug adapter should let pydevd know about this setting. I don't think we should overload multiThreadsSingleNotification. This should be its own setting, which should enable/disable single thread stepping. pydevd will receive launch/attach json and can pick this setting from there. I don't think we need a debuggerProperty for this one. We plan on deprecating the 'old behavior' as soon as possible.

@karthiknadig
Copy link
Member Author

karthiknadig commented Jun 11, 2019

For clarification, deprecation of debugOptions means turning them into boolean settings in lauch/attach json. for example, currently we set "justMyCode": true in VSC. but it is translated to debugOptions and translated back to a boolean setting. This was needed to support VS style of settings. But, going forward VS will also be using json settings, such translation is unnecessary. So it should be deprecated. That is for a future task.

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

No branches or pull requests

2 participants