You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When debugging pytest test case, debugger detatches when subprocess.run invokes python #993
I have tests with pytest, where, if I try to use subprocess.run to invoke another instance of the python interpreter during my test, and then I try to step through that test with a debugger, the python debugger detaches.
If I connect the debugger to the file itself, instead of running on the test case, it is able to step over every line of code, and does not detach. However if I use the "Testing" menu on the left hand side of VSCode to run test cases with a debugger (or selecting the icon next to the test), the debugger will detatch after the line subprocess.run:
Activity
rchiodo commentedon Apr 2, 2026
Thanks for the issue. This should be a dupe of #981