How to debug a referenced dll (having pdb)

后端 未结 10 1914
孤独总比滥情好
孤独总比滥情好 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:14

    When you want to set a breakpoint in source code of a referenced dll, first make sure that you have a pdb file available for it. Then you can just open the related source code file and set a breakpoint over there. The source file does not need to be part of your solution. As explained in How can I set a breakpoint in referenced code in Visual Studio?

    You can review your breakpoints through the breakpoints window, available via Debug -> Windows -> Breakpoints.

    This approach has the benefit that you are not required to add an existing project to your solution just for debugging purposes as leaving it out has saved me a lot of build time. Evidently, building a solution with only one project in it is much faster than building a solution with lots of them.

提交回复
热议问题