VS 2022 17.1.3 目前不会命中断点
我正在尝试调试我的 Visual Studio C# Blazor 项目,但是每当我尝试设置断点时,我都会收到错误“当前不会命中断点。未绑定断点。”或“尚未加载任何符号。”我一直能够调试直到最新的视觉版本。我尝试过以下方法:
- 调试而不是发布模式。
- 清理和构建解决方案。
- 选中和取消选中“仅启用我的代码”
- 仔细检查我的 launchSettings.json
如果有人能给我任何有关如何解决此问题的建议,我将不胜感激。
I am trying to debug my Visual Studio C# Blazor project however whenever I try and set a break point I get the error "The breakpoint will not currently be hit. Unbound breakpoint." or "No symbols have been loaded." I had been able to debug until the latest visual release. I have tried the following:
- Debug and not Release mode.
- Cleaning and building the solution.
- Checking and Unchecking "Enable Just My Code"
- Double checking my launchSettings.json
If anyone can give me any advice on how to solve this it would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(5)
追我者格杀勿论2025-01-26 02:53:48
尝试添加“ NativeDebugging”:true
to 启动settings.json :
"profiles": {
...
"YourProject": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:12345",
"nativeDebugging": true
},
...
}
也可以通过
来设置这一点
项目属性 - > debug - > 一般 - > Open Debug启动配置文件UI
- >单击左侧的项目,然后检查启用本机代码调试
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我通过在解决方案资源管理器中右键单击项目,转到属性/构建/常规并将“调试符号”设置为“ PDB文件,跨平台的Portable”来解决问题。
I fixed the problem by right-clicking the project in Solution Explorer, going to Properties/Build/General and setting "Debug Symbols" to "PDB file, portable across platforms."