gpt4 book ai didi

visual-studio-2010 - Visual Studio 认为 "User Code"是什么?

转载 作者:行者123 更新时间:2023-12-04 01:00:54 26 4
gpt4 key购买 nike

假设我有一个抛出异常的函数。假设这个函数被第三方DLL调用,第三方DLL会处理我抛出的异常。

如果 Visual Studio 确定第三方 DLL 不是“用户代码”(如下图所示),则默认情况下它将停止我的异常,即使它稍后会得到处理。这样做并没有错。它清楚地解释了用户代码未处理异常。但是是什么让 Visual Studio 将某些 DLL 称为“用户代码”而其他的却不是?

enter image description here

我有一个理论认为这是因为未加载符号而发生这种情况,但列表中有模块已加载符号但仍不被视为“用户代码”。

最佳答案

是的,如果没有 .pdb 文件,调试器无法判断它是否是用户代码。 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.

关于visual-studio-2010 - Visual Studio 认为 "User Code"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9616715/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com