- Print
- Comment
- DarkLight
- PDF
How do I debug a test
Article summary
Did you find this summary helpful?
Thank you for your feedback!
The video below will give you a short walk through on how to debug a test from the terminal in vs code
Steps
Add a breakpoint as needed before running the test.
- In terminal run the following:
$env:VSTEST_HOST_DEBUG=1
- Then run the tests with the appropriate dotnet test command
Note you might want to run an individual test as shown below if you want to focus on one test.
dotnet test --filter FullyQualifiedName=logicapp.testing.acceptancetests.Features.Echo.MsTest.Tests.MsTest_Echo_GreenPath --logger:"console;verbosity=normal"
- When finished set the environment variable back to 0 to turn off debugging
$env:VSTEST_HOST_DEBUG=0
Was this article helpful?