I'm not sure what I did, but all of a sudden, my Visual Studio 2012 will not debug any tests.
If I select a test from the Test Explorer and tell it to run, it simply outputs this in the Test Output window:
> ------ Discover test started ------ > ========== Discover test finished: 29 found (0:00:01.3371755) ========== > ------ Run test started ------ Process with an Id of -1 is not running. > ========== Run test finished: 0 run (0:00:01.4711861) ==========
what the heck does that mean?! After doing this a few times, the error changed to:
The Operation was Cancelled
which I sure didn't do.
It's doing this on every test in the list.
however, I can RUN the tests no problem, and they pass... but I cannot debug the tests.
What might I have done? I did not actively go into any settings and change anything, perhaps a stray click somewhere, but where?
Once you have your launch configuration set, start your debug session with F5. Alternatively, you can run your configuration through the Command Palette (Ctrl+Shift+P) by filtering on Debug: Select and Start Debugging or typing 'debug ' and selecting the configuration you want to debug.
If the execution of a SpecFlow test is stopped at a certain point of the binding (e.g. because of an exception), you can navigate to the current step in the feature file from the “Call Stack” tool window in Visual Studio. By default, you cannot debug inside the generated . feature.
I encountered this today. I tried closing the solution but it didn't work. My mistake I set my solution to Release Mode instead of Debug Mode. I set it to Debug then it worked as expected.
I'm using VS 2015 professional.
I was getting the same output after upgrading a test project from VS 2010 to VS 2012 Ultimate Update 3. The message was displayed in Test Output window after using MSTest command to Debug Selected Tests.
I tried to debug tests using Resharper 8 Unit Test Session window. The message in the result window was "Test wasn't run".
The solution that helped me was to modify the test project settings to enable native code debugging as instructed at this link: Uncaught exception thrown by method called through reflection
In case the link does not work:
Thanks to GalDude33 for posting the solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With