No breakpoints hit when debugging plugin

I've just started looking at my plugin project that has been neglected for almost a year. I converted the project from VS2008 to VS2010, reported the reference path to the R# 5.1 binaries directory and configured the project properties for debugging. I can F5 into devenv.exe and have my plugin loaded, but the debugger does not hit any breakpoints even though the code is being executed.

Any ideas on how to fix this? It is next to impossible to develop a plugin without being able to break into the debugger.


Hey Rory,

I assume you may have fixed this already, but in case you didn't: can you detail the project debug properties for me?

You'll want to set:

Start Action to "Start external program" and point at devenv.exe for your target VS installation.


Start Options Command line arguments to: /ReSharper.Internal /ReSharper.Plugin {full path to your plugins binary as produced by the project output}



I was developing the plugin again yesterday. The problem is still there, however I have a workaround. I F5 the solution to spin up devenv.exe with the plugin loaded. I then detach the debugger and attach it again. Breakpoints now get hit.

Edit: Wasn't aware of the /ReSharper.Internal switch but it has no affect with regard to this issue.


That's very odd behaviour by VS.  Sorry I can't suggest anything new really.  Can you describe what happens the first time you debug... before you re-attach?  Do the breakpoints have a warning triangle overlay with a description of why they won't be hit?  Things such as "no symbols have been loaded" or "the source code doesn't match" come to mind.


When I run F5, the breakpoint indicates that the related module/symbols have been loaded (solid red dot). Weirdly, the Modules window is completely blank. When I detatch and re-attach, the module list is then populated with all the loaded modules, including my plugin.

I'm calling it as "The sky is blue" on this one.


I've had the same issue since installing VS2010 SP1 and some windows updates.

When I changed my plugin's target framework from .NET 3.5 to .NET 4, everything worked again. I'm however not sure about VS2005/VS2008 support when you do this.

Apparently when you use .NET 3.5 as target, Visual Studio is attaching something called "ProteusDebugEngine" instead of the CLR 4 debugger engine.

You can also use the System.Diagnostics.Debugger.Break() statement to attach the JIT-debugger.

Any comments by one of the R# developers ?


Can confirm! VS 2010 SP1, .NET 4.5 installed. Switched the R# 7.1 plugin target framework version from .NET 3.5 (provided from project template) to .NET 4.0. Debugging works


Yes, this is an issue with .net 3.5/.net 4 and Visual Studio's debugging. Our guidance is to builds your plugins in .net 3.5, so that they can be loaded in all of the versions of Visual Studio that ReSharper supports. Debugging will work if you attach to an already running instance of Visual Studio, since the Visual Studio instance you're debugging from can see what version of the CLR is already loaded, and use the appropriate debugger. When starting an instance of Visual Studio from your plugin project, Visual Studio sees your project is .net 3.5, assumes it's going to use the .net 3.5 debugger, and then fails to debug the .net 4 CLR instance. This is just how Visual Studio works.

One workaround is to add an empty .net 4 project to your solution and set it as the startup project for your plugin. Visual Studio sees the .net 4  project and uses the .net 4 debugger, and all works as it should (add a reference from the empty project to your plugin to make sure everything builds when it should)



Please sign in to leave a comment.