I’m not able to debug my tests using Resharper-Debug option in my project. I have seen this issue raised by lots of people, but has’t come across a solid suggestion which solves my issue.
The strange thing is that, if I create a sample project and write a simple unit test, I’m able to debug it without any issues.However when I try to do this in my current project, it simply throws a dialog box saying “Cannot Launch Debugger”.I have checked this with my peers, and they does’t face this issue 🙁
Also I don’t have any issues while running the test.
It’s an XP machine and following is the version of resharper:
JetBrains ReSharper 5.1 C# Edition
Build 5.1.1753.4 on 2010-10-15T15:51:30Licensed to: XXXXXXX
Plugins: none.
Visual Studio 9.0.21022.8.Copyright © 2003–2011 JetBrains s.r.o.. All rights reserved.
Thanks,
-M
I occasionally encounter a test that can’t be launched with the Resharper debug icon (due to mock objects or 32 vs 64 bit dlls). A solution that works for me is to add an explicit call to launch the debugger in the test
Then just run the test as normal. When code execution hits that line you get a security popup (pick yes)
then a visual studio choice popup (pick your currently running visual studio).
You’ll be dropped into your code in debug mode at the location where you added the Debugger.Launch() line.