英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论