Debugging a third-party DLL in Visual Studio?

后端 未结 8 1711
猫巷女王i
猫巷女王i 2020-12-06 05:03

I am using a third-party DLL. For some particular cases, a function in the DLL is throwing an exception. Is it possible to debug the DLL in the Visual Studio?

After

8条回答
  •  眼角桃花
    2020-12-06 05:33

    Building on Andrew's answer, you just treat the decompiled source code as a new library within your project and set breakpoints in the source. Remove all references to the 3rd party DLL so that it is the decompiled code that is executing.

    Other things:

    • You may be breaking the law by decompiling the code, or breaching a licensing agreement with the 3rd party vendor. Make sure to review this with someone.
    • You will want to make sure that you remove references to your decompiled version if you are shipping to other developers, or checking into a larger source tree. Easy to forget this!

提交回复
热议问题