Breakpoints in Microsoft Visual Studio no longer work after migrating from Nunit2 to Nunit3 with TestCentric.GuiRunner.1.6.4 #1112
-
When starting the application from MVS debug with testcentric.exe my.dll, the breakpoints are disabled. Is there an alternative way, so no manual attach is needed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, this is not available in 1.6.4. As a Workaround, create a source file similar to this in your test project:
I used The run is paused at the Debugger.Launch statement. You can use that time to set breakpoints if you have not set them in advance. Continue execution and your breakpoints will be hit. You may want to consider using the 2.0.0-beta5 release in lieu of 1.6.4. It's not fully production-ready so it's usefulness to you will depend on what features you need. FWIW, that beta does allow running an agent directly but the feature is only used internally for my own tests and the details are not yet documented. If you decide to try that approach, contact me. However, I think the above workaround is probably the best approach for now. When your tests |
Beta Was this translation helpful? Give feedback.
No, this is not available in 1.6.4. As a Workaround, create a source file similar to this in your test project:
I used
#if DEBUG
because you are debugging and also to avoid this code ever being released to your users. Note that this code specifies no namespace, so the class is in the global namespace. The EnableDebugger method will run before any tests in your assembly are executed, launching the debugger on your behalf.The run is paused at the D…