What does Visual Studio consider “User Code”?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 13:20:57
Hans Passant

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!