Exclude certain projects from stepping through during debug in VS2010?

后端 未结 1 722
生来不讨喜
生来不讨喜 2021-01-13 03:47

I am working on a couple of projects (A and B) in a large VS2010 solution (all in C#). There are many cases where methods from project A call through to one or more of the

相关标签:
1条回答
  • 2021-01-13 04:37

    Yes, this is possible by enabling Just My Code and preventing symbol loading for the DLLs you don't care about.

    To enable Just My Code:

    • Debug » Options and Settings... » General » check "Enable Just My Code (Managed only)".

    To prevent symbols from loading for a DLL:

    • Debug » Options and Settings... » Symbols » click "All modules, unless excluded"
    • Click "Specify excluded modules"
    • Add the names of the modules you want to exclude. Their symbols will not be loaded when you debug your application.

    Now, when you do an F11 step-into from project A into project B that goes through project C, as long as you don't have the symbols for C loaded, the step-into will go directly into B.

    To ensure that the symbols for C aren't loaded:

    • Start debugging
    • Get to a point where C is loaded
    • Open the Modules window (Ctrl+Alt+U), scroll to the entry for C
    • The "Symbol Status" column should say "Loading disabled by Include/Exclude setting."
    0 讨论(0)
提交回复
热议问题