-
Notifications
You must be signed in to change notification settings - Fork 70
Closed as not planned
Closed as not planned
Copy link
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
When using the "Debug Test" functionality in VSCode with Python, I am unable to get the debugger to attach to subprocesses spawned during the tests. I've set "subProcess": true
in my launch.json
file and included "purpose": ["debug-test"]
, which seems like what I am suppose dto do to configure "debug test" launches... but this doesn't seem to have any effect -- the debugger still doesn't attach to subprocesses.
Additionally, I have tried to use the "connect" option to attach to an existing process, but VSCode doesn't allow the "connect" attribute at all when "purpose" includes "debug-test".
I've prepared a simple project to demonstrate the issue:
https://github.com/rwarren/DEMO_vscode_subprocess_debug
Details:
- The test suite starts a subprocess that needs to be debugged
- Although I would also like to (and prefer to) be able to attach to an already running subprocess to save startup time when iterating on test code vs application code
- The launch.json configuration includes
"subProcess": true
, but subprocess debugging doesn't work during "Debug Test" runs - vscode does not allow "connect" when
"purpose": ["debug-test"]
is set, limiting this option as well
What I'm hoping for here:
- Guidance on how to enable subprocess debugging when running tests with "Debug Test".
- i.e. am I just doing this wrong?
- Clarification on whether this is a limitation of the current debugger implementation.
- i.e. is this just not possible?
- Suggestions for workarounds to debug subprocesses in tests
- e.g. I am considering running two vscode instances, one that debugs the server, an da second that debugs the tests... but this is obviously not-ideal
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team