Resharper debugging a third party decompiled dll

Is there a way to debug into a decompiled dll using Resharper and if so how do you do this?

For example I am trying to debug into System.Web.Http.ApiController where I have decompiled and can see the source.

I have set a breakpoint but when I run the application it does not break into decompiled breakpoint when debugging.


Solution 1:

Yes, you can with Resharper 9.0

(not sure for previous versions).

Go to menu "Resharper" > "Windows" > "Assembly Explorer"

  • Add an assembly there with the first button on the left (with a + on it)
  • Then right click on it and choose "Generate Pdb..." (wait until it's done)
  • now you're able to break in the code.

Note however as Jens told, it will probably break license terms

Solution 2:

Debugging facilities are introduced in dotPeek 1.2 and here is a nice post describing how to configure symbol server and dotPeek 1.2 to debug decompiled code from VisualStudio: http://blog.jetbrains.com/dotnet/2014/04/09/introducing-dotpeek-1-2-early-access-program.

Solution 3:

Select an assembly in the Assembly Explorer Window and click Export to Project on the toolbar, or choose Export to Project in the context menu.

More info here

Also, check you have this configuration on the main Debugging options page (Tools -> Options -> Debugging -> General):

Uncheck the "Enable Just My Code" option

Uncheck the "Enable .NET Framework source stepping" option

Check the "Enable source server support" option

Uncheck the "Require source files to exactly match the original version