Skip to content

When thread is no longer stopped the focus is not automatically passed to another thread #125144

@luabud

Description

@luabud

Hey there!

We have a problem in the Python extension when it comes to the UX of multi-process debugging.
Take the example below:

from concurrent.futures import ProcessPoolExecutor
from time import sleep

values = [2, 3, 4, 5, 6]

def cube(x): 
    res = x ** 3
    print(f"Cube of {x}:{res}")

if __name__ == "__main__":
    result = []
    with ProcessPoolExecutor(max_workers=5) as executor:
        result = executor.map(cube,values)

    for r in result:
        print(r)

If you add a breakpoint to e.g. line 7 (res = x ** 3), start debugging this file in VS Code (just make sure to select "Python File" from the drop down menu once you hit F5) and hit continue, the first subprocess that is in focus will continue, and the focus will remain in it, even though you have multiple other subprocesses paused on that breakpoint.
The request here is if there's a way the focus could automatically switch to another subprocess that is paused.

image

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authordebugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release notesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions