Debugging a release version of a DLL (with PDB file)

后端 未结 4 1773
余生分开走
余生分开走 2020-12-24 07:21

If I have a DLL (that was built in release-mode) and the corresponding PDB file, is it possible to debug (step-into) classes/methods contained in that DLL?

If so, wh

4条回答
  •  醉话见心
    2020-12-24 08:00

    I finally found what cause the problems debugging a DLL that was built in release configuration:

    First of all, it basically works as expected. Which means, if I have a DLL built in release-configuration plus the corresponding PDB file, then I can debug the classes/methods contained in that DLL.

    When I first tried this, I unfortunately tried to step into methods of a class which has the DebuggerStepThroughAttribute, e.g:

    [System.Diagnostics.DebuggerStepThrough]
    public class MyClass {
        public void Test() { ... }
    }
    

    In that case, it is of course not possible to step into the method from the debugger (as expected/intended).

    So everything works as intended. Thanks a lot for your answers.

提交回复
热议问题