installing agUnit disables breakpoints in VS2010/SL

Nov 9, 2010 at 2:33 PM

Hi,

I have an aspx page that hosts a SL page in it's content. I can set breakpoints both in the aspx codebehind as well as the xaml codebehind and all is fine. When I install the agUnit plugin for ReSharper then the breakpoints in my aspx codebehind still work as before but any breakpoints in the xaml codebehind is disabled and shows the yellow circle with the exclamation mark which says "The breakpoint will not currently be hit. No symbols have been loaded for this document". I found that if I disable the plugin from the ReSharper Plugin menu and rebuild that the breakpoints are hit again like expected.

Is this the expected behavior? If yes, is it then necessary to enable/disable the plugin depending on whether you want to debug using VS2010 or agUnit? The plugin is AWESOME and I hope to be able to continue to use it.

thanks in advance!

Bill44077

Nov 9, 2010 at 2:41 PM

Hi,

Update: So I found that if I disabled the agUnit plugin from the ReSharper menu that my normal breakpoints worked again. Then I enabled the plugin and I could set breakpoints in the unittest and selected Silverlight Debug from the icon/menu in the test code and hit that breakpoint. I then went back to running the app in debug and it hit my original breakpoint in the xaml codebehind. So not it seems that everything is working as I would expect but not sure how I got into that other condition.

thanks,

Bill

Coordinator
Nov 9, 2010 at 5:36 PM

Hi Bill

Thanks for your support for AgUnit !

About the debugging issue, it certainly is not expected to break the regular debugging. I use this daily without any problems.

What you should check first is to make sure the "Silverlight" checkbox on the "Web" tab of the properties of your web project is checked.
Without that, Silverlight debugging won't work when you debug the web project.

You should also avoid debugging with any other browser than internet explorer, I've experienced issues with debugging in both firefox and chrome.
This is usually due to your browser caching the .xap file. Try clearing your browser cache to see if that helps, maybe even try in another browser ...

If none of that works, can you try creating a new web and silverlight project and see if that works ?

AgUnit should not interfere with runtime debugging, it's a purely a plugin for the resharper unit test runner.

If you can't find the problem, let me know what version of visual studio, resharper, silverlight and the silverlight sdk you are using (you can find them in programs and features in the windows control panel).
This way I can try to reproduce the problem.

Greetings,

Steven

Nov 10, 2010 at 4:40 PM

Hi Steven,

Just wanted to say Thanks Again for a great plugin! What a time saver!

I did find that if I deleted my .suo file that everything worked fine again as far as breakpoints and testing with agUnit goes.

One question that I did have which is probably obvious but I just wanted to double check on this: When you are running unit tests for Silverlight using the popup context menu inside the test.cs file, only the Silverlight Debug menu item runs the unit test in the Silverlight Browser plugin, right? My tests seem to execute using Run or Debug in that context menu - but those are running MSTests which may or may not be correct, right?

thanks!

Bill

Coordinator
Nov 10, 2010 at 7:43 PM

Hi Bill

Great that you have found the solution to your problem.

About the context menu actions, it's the MSTest runner interfering with AgUnit. I've explained this in detail on this issue: http://youtrack.jetbrains.net/issue/RSRP-188298.

Basically it's the MSTest runner that is stealing away the test from AgUnit and it has no way to prevent that. If you're not using MSTest, but something like NUnit for your non-silverlight tests, I advise you to disable the MSTest runner. Also if you use the "test bullet" menus, the tests should always be run with AgUnit.

For a next version of AgUnit I plan to do some very ugly reflection to get around this problem.

Greetings

Steven