1

I have written xUnit tests for my C# solution.

Visual C# Express does not integrate with unit test tools, so people usually use external tools, and indeed I have used the external xUnit test runner so far.

But now I would like to debug a particular test within Visual C# Express, because this test crashes the xUnit test runner.

I am thinking of creating a dummy executable project that just references the unit tests project and calls the test.
Any smarter idea?

Community
  • 1
  • 1
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373

2 Answers2

2

If you're willing to upgrade to Visual Studio 2012 Express for Windows Desktop, you can use the xUnit.net runner for Visual Studio 2012. Otherwise you might be able to attach to the test runner's process (Debug -> Attach to process...) and debug it that way.

bricelam
  • 28,825
  • 9
  • 92
  • 117
0

I'm not sure if this functionality exists in the Express version, but you should be able to do Tools -> Attach To Process, then attach to the xunit test runner application (make sure it's running). Place a breakpoint in one of your tests, and when you Run the test(s) in the xUnit Test Runner, you should be able to debug like normal.

goldenratio
  • 1,026
  • 14
  • 24