Сообщения за Декабрь, 2016

Not Just My Code: How to debug third party libraries without decompiling them


So I'm back... writing another blogpost. Hope this would be good one.

If you are using any third party library you probably know the pain you are getting if something works not as you expected...

Imagine the most common scenario - you have a website which uses third party library. Basically it's DLL which provides some integration points for you. You try to integrate with it, it doesn't work but you have no idea why. If it was your code you could have debugged it, but what if you don't have the code? Usually in my case this meant reverse engineering and decompiling using tools like ILSpy, and replacing OOTB code to be able to debug it step by step.... But is it really the only way to do it?
Fortunately there is a better way.
Step 1 - Generate symbols using decompiling tool dotPeek.
When library is built in Visual Studio it's it's also supplied with *.PDB files which contains all the information about how to debug it. Unfortunately if you ar…