Skip to content

Breakpoints in Microsoft Visual Studio no longer work after migrating from Nunit2 to Nunit3 with TestCentric.GuiRunner.1.6.4 #1112

Answered by CharliePoole
ErikBee asked this question in Q&A
Discussion options

You must be logged in to vote

No, this is not available in 1.6.4. As a Workaround, create a source file similar to this in your test project:

#if DEBUG
using System.Diagnostics;
using NUnit.Framework;

[SetUpFixture]
public class EnableDebugging
{
    [OneTimeSetUp]
    public void EnableDebugger()
    { 
        if (!Debugger.IsAttached)
            Debugger.Launch();
    }
}
#endif

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ErikBee
Comment options

Answer selected by ErikBee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Question User question
2 participants