3

I am using NCrunch to run tests in my project and have a test method that is failing, which looks like this:

Test method failing in NCrunch

Is there any way I can debug this method and if so how?

In this StackOverFlow post Jon Skeet mentions you can "attach the debugger to the process" but I do not know how to do this - could anyone tell me how?

Community
  • 1
  • 1
NRKirby
  • 1,584
  • 4
  • 21
  • 38

1 Answers1

4

This is quite straightforward. You can do 1 of several things:

  • Right click on any of the red dots and choose 'Debug covering tests in new task runner process' (this might run several tests if more than 1 test covers that line ie if you click on a dot in the source code under test rather than the code in the actual test)
  • Right click on the red '>' and choose 'Debug starting tests in new task runner process' (this will only run one test, but this starting point is only available in the actual test)
  • In the tests windows (ctrl-shift-m) click the test then right click and choose 'Debug selected tests in new task runner process'
  • In the tests windows (ctrl-shift-m) click the test and select the little 'bug' icon on the toolbar at the top.
Sam Holder
  • 32,535
  • 13
  • 101
  • 181