Visual Studio Just My Code 仍然步入框架

huangapple go评论43阅读模式
英文:

Visual Studio Just My Code still steps into framework

问题

我在VS 2022中启用了“仅加载我的代码”,但是当我使用F11进行步入调试时,它会进入不属于我的代码的部分。

我看到有各种模块被列为“用户代码”(例如,Newtonsoft.Json.dll 的“用户代码”设置为是)。这些模块显示符号状态为已加载。大多数其他模块的状态为“无法找到或打开PDB文件”。

这使得调试变得费力。我是否漏掉了其他设置?

还是只需要选择每个模块并选择“不自动加载”就可以了?

我不记得选择加载这些符号。我确实看到,要启用步入模块代码,我需要符号,而且代码不能被优化。但这是否意味着如果我加载符号并且它们未经优化,我就别无选择,只能步入它们呢?

英文:

I enabled Just My Code in VS 2022, however, when I step in with F11 it takes me into code that's not mine.

I see various modules listed as User Code (e.g. Newtonsoft.Json.dll has User Code set to yes). These show symbol status as loaded. Most others have status of Cannot find or open the PDB file.

This is making debugging laborious. Am I missing some other setting?

Or is this as simple as selecting each module and choosing don't load automatically?

I don't recall doing electing to load these symbols. I did read that to enable stepping into module code I need symbols and the code can't be optimized. But does that mean that if I load symbols and they're not optimized, I have no choice but to step into them?

答案1

得分: 0

对于任何遇到这个问题的人,我的解决方法是转到“选项-调试-常规”,取消选中“在模块加载时抑制JIT优化”。

英文:

In case anyone runs into this, the solution for me was to go to Options-Debugging-General and uncheck Suppress JIT optimization on module load.

huangapple
  • 本文由 发表于 2023年3月4日 09:39:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75633158.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定