Debugging NUnit test - There is no source code available for the current location

When debugging an Nunit test with the resharper test runner, I have a line of code where an object reference is null. When I try to step over this in VS2008 I get a popup window that states "There is no source code available for the current location."

Ive tried everything I could find to try and stop this behaviour. This is wearing me thin now, please can some tell me how to stop this.

3 comments
Comment actions Permalink

Hello Jonathan
     When you step over a line with a null reference, a NullReferenceException gets thrown and Visual Studio tries to bring you to the place where exception is handled. Since it's not handled in the unit test, Visual Studio tries to carry on to ReSharper's unit test runner code (where all unit test exceptions are handled) and fails to find the source code for that location. Could you please clarify what kind of behavior do you expect in this case? Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

I expect it to be unobtrusive. I do not want my debugging experience to be hampered or distracted by dialogs asking me to locate some source code that I dont have. I expect the debugger to stop at the line of code with the exception, just as it would when I'm debugging an application not run from the a test runner. I cant think of anyone who would not want the same experience. Is there away to prevent the file open dialogs. I used resharper before in this way I dont remember it asking me to load resharper source files.

0
Comment actions Permalink

Yes, I also expect this: the experience should be the same as when debugging through an application. I'm sure this is what happens when debugging through mbUnit tests in VS2005 using R#.
Otherwise it's very frustrating!



- Rory

0

Please sign in to leave a comment.