How to get Visual Studio to step into third party assemblies
Asked Answered
G

4

19

When I'm debugging or even coding, it would be really uesful to examine third party assemblies but I can only see their metadata.

Given that tools like reflector can decompile assemblies, is there someway or some tool which would allow visual studio to do the same thing?

If I happen to have access to the PDB files for an assemblies, would placing them into my applications bin folder allow me to examine the assemblies content through visual studio?

Gauffer answered 20/3, 2010 at 2:31 Comment(0)
C
27

If you have PDB's for a DLL you can certainly examine the DLL while debugging. Make sure that you have "Just My Code Disabled" and you should be good to go

Tools -> Options -> Debugging -> Uncheck "Just my Code"

There is one caveat though, the Visual Studio debugger will not decompile the assembly. It will read source file information from the PDB, if available, and suggest a location to look for the source file. If you do not have access to the source fie you will be forced to look at the machine disassembly (not decompiled IL) while debugging.

Ciscaucasia answered 20/3, 2010 at 10:24 Comment(0)
E
10

You can load the pdbs through the call stack.

Just right click on a function that you want to load the pdb for, then go to 'Load Symbols'. Browse for the correct pdb, and press OK. After that, it should be able to provide information for the calls in that pdb.

Edmundoedmunds answered 20/3, 2010 at 2:45 Comment(0)
F
7

Try .NET reflector Pro here.

I believe it's also available in their free version.

Flywheel answered 20/3, 2010 at 2:49 Comment(1)
Yes, Pro does this. It is not free.Suetonius
M
0

Also, when done all the other suggestions, if you're still unable to step into the code, go to "Debug" > "Windows" > "Modules" (while your project is running and at a breakpoint).

Look for your DLL and on that line you'll see the reason why Visual Studio is unable to step into the code.

Moffit answered 6/3 at 9:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.