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?

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I have switched to NUnit, so I can't try, but that like what I wanted!
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.