Cannot restart test debugger (i.e. shift-cmd-F5) with "purpose"==["debug-test"]
See original GitHub issueSorry, not sure whether this is a bug report or feature request
Environment data
- debugpy version: 1.4.3
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.5 (default, May 4 2021, 03:33:11) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin, built by Homebrew
Version: 1.60.2 Commit: 7f6ab5485bbc008386c4386d08766667e155244e Date: 2021-09-22T11:59:27.195Z (1 wk ago) Electron: 13.1.8 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 19.6.0
Actual behavior
When debugging a pytest unit test in the test explorer with the following launch configuration
{
"name": "Test Config",
"type": "python",
"request": "launch",
"purpose": ["debug-test"],
"justMyCode": true,
"console": "integratedTerminal",
"env": {
"_PYTEST_RAISE": "1"
},
}
I am not able to restart the debugger using the debug controls (e.g. shift-cmd-F5) and receive the following message
This configuration can only be used as defined by `purpose`
Expected behavior
The debugging session is refreshed and the test run again
Steps to reproduce:
- Debug a unit test from test explorer
- Break at a breakpoint
- Click the “restart” button or press shift-cmd-F5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Cannot start debugger in Test Explorer - Visual Studio Feedback
Hi,. I am unable to start a debug session for a unit test written with Xunit. When I use CTR-R CTR-T or start...
Read more >Error: Unable to Start Debugging on the Web Server
Multiple debugger instances may be attached to the IIS process; a reset terminates them. For more information, see Check your IIS Configuration.
Read more >Debugger not working in IE 11 F12 developer tools
Then restart IE and enjoy your DEV TOOLS! ... Uncheck "Disable script debugging (Internet Explorer)" ... Check "Enable protected mode".
Read more >Debug JavaScript in Internet Explorer 11 in 7 easy steps
You can now start to step through the code. To do this, you use the four buttons in the debugging pane. play pause...
Read more >Internet Explorer debug tutorial | DebugBar
It also allows you to run arbitrary Javascript code with its input, which can be useful for security tests and other debugging forms....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed via #18290
I think the scenario here is that the session is started via the Test Explorer, but then restarted (while it’s still running) via Run -> Restart Debugging.