How to debug a referenced dll (having pdb)

后端 未结 10 1878
孤独总比滥情好
孤独总比滥情好 2020-11-27 09:49

I have two solutions in my workspace, say A and B.

Solution A is an older project which I finished coding some time ago. In solution B, I need to use some classes fr

10条回答
  •  隐瞒了意图╮
    2020-11-27 10:19

    I don't want to include an external class library project in some of my solutions, so I step into assemblies that I consume in a different way.

    My solutions have a "Common Assemblies" directory that contains my own DLLs from other projects. The DLLs that I reference also have their accompanying PDB files for debugging.

    In order to debug and set breakpoints, I set a breakpoint in the consuming application's source where I'm calling a method or constructor from the assembly and then step INTO (F11) the method/constructor call.

    The debugger will load the assembly's source file in VS and new breakpoints inside of the assembly can be set at that point.

    It's not straight forward but works if you don't want to include a new project reference and simply want to reference a shared assembly instead.

提交回复
热议问题