Closed ChristophSchmidpeter closed 3 years ago
Here is a slightly more detailed tutorial.
The gist is that to debug tests that are run through dotnet test
, there are actually two processes involved:
dotnet test
binary itself, which acts as a coordinator, andWhen you use the VS Code debugger to attach to the second of these, the first process is paused and waiting for execution to resume, so you must use the 'debugging resume' button, which looks like a 'play' symbol, from the debugging toolbar to continue execution. The final screenshot in this tutorial shows the toolbar I speak of in the top-right hand side of the image.
@baronfel Thanks for the amazingly fast response and the detailed description and link to the tutorial. Now I have got it working.
Is there already a feature request to have the plugin automatically attach the debugger to the testhost process, or is there any technical impediment that prevents implementing this?
Edit: I have created a respective feature request.
Running xUnit / NUnit tests hangs after the console output:
Host debugging is enabled. Please attach debugger to testhost process to continue.
In #46 @georgewfraser recommends pressing a play button:
I assue the button on the very left toolbar was meant. However, that doesn't seem to help. How can I get the unit thest to be debugged?