Can dotPeek debug decompiled sources?

Since version 1.2, you can use dotPeek to debug decompiled sources using its Symbol Server functionality. You may find additional information in this guide.

Symbol Server

7 comments

Article is updated since dotPeek 1.2 can be used to debug decompiled sources.

0

Not sure if this is the right area to post this to, but it seemed as good as any, but I can't seem to make this work -- I've followed the steps using VS 2013 update 3.

Visual Studio downloads the .pdb files from dotPeek(), and I spun up a quick console app that invokes several things that I don't have the source to:

static void Main(string[] args)

{

    Console.WriteLine("HELLO WORLD!");

    var rex = new Regex("HELLO WORLD");

    var a = new ArrayList();

    a.Add(rex);

    a.Clear();

    a.AddRange(new[] { rex, new object(), 5});

}

When I get to any method that I don't have the source to, I press F11 to step into it (like Console.WriteLine, or new Regex, or new ArrayList, or a.Add, a.Clear, a.AddRange, etc.) -- and it always just steps over the code instead of into it. -- How do I actually debug code that I don't have with this tool? -- The tool itself can generate and decompile the code in it's own window, but it doesn't give Visual Studio the ability to debug it...

In VS2013, Under Tools->Options->Debugging->General, I have "Enable Just My Code" unchecked, I have "Enable .NET Framework source stepping" checked, I have "Step over properties and operators (Managed only)" unchecked.

In VS2013, Under Tools->Options->Debugging->Symbols I have emptied my symbol cache, and the only checked source is http://localhost:33417/ -- I have "All modules, unless excluded" checked, and I've verified there are no excluded modules.

In dotPeek, Under Tools->Options->Symbol Server, I have "All assemblies" selected, and the port is set to 33417.

The Assemblies load correctly in Visual Studio, and in dotPeek -- and Visual Studio has a little loading dialog for every assembly now -- but debugging is just plain not working.

Is there an additional step I need to complete, or setting I need to turn on?  Please advise.

1

Under Tools->Options->Debugging->General *uncheck* enable source server support -- this appears to break everything.

At this point you can put a break point on code, right click and select step into method, and you'll get a screen that unlike before does not say that the source is unavailable, but instead that says it's just not loaded -- you can then click load but that's a real PITA.

Instead, after you have started debugging, go to Tools->Options->Debugging->Symbols and click "Load all symbols" (no idea how to make this automatic -- still a PITA, but not as much).

Sometimes even then this isn't enough and you still get prompted for where .cs files are for random .NET assemblies -- when this happens just go back into the menu and press it again -- or F11 is still ignored at some critical time... -- so, YMMV.

Wish this worked / integrated into Visual Studio better (i.e. this is a lot of configuration to have to deal with and not a lot of official guidance on how to do any of it -- why isn't this just handled at installation time?).

2

Does this feature support remote debugging?

0

This is a .pdb issue.

Just do this --

Go to ->

Debug-> Options-> Debugging-> Symbols -> Checked the Microsoft Symbol Servers and click "Load all symbols"

 

That 'll load the all .pdb files or symbol with your project.

0

Please sign in to leave a comment.

Have more questions?

Submit a request