What does Visual Studio consider “User Code”?

后端 未结 1 1792
名媛妹妹
名媛妹妹 2020-12-11 15:46

Suppose I have a function that throws an exception. Suppose this function is called by a third-party DLL, and the third-party DLL will handle the exception I’ve thrown.

相关标签:
1条回答
  • 2020-12-11 16:12

    Yes, without a .pdb file the debugger can't tell whether it is user code or not. It is explained reasonably well in the MSDN article:

    To distinguish user code from non-user code, Just My Code looks at three things: DBG Files, PDB files, and optimization.

    In a standard Debug build, optimization is turned off and debug symbols are created for all modules. When you run a debug build, those modules are considered to be user code. If I call a library function that is optimized and does not have debug symbols, however, it is not user code. Just My Code prevents execution from stopping at breakpoints in the library code, which is usually not code you are interested in debugging. In the Breakpoints window, those breakpoints will appear with the Disabled Breakpoint icon.

    0 讨论(0)
提交回复
热议问题