跨断点时出现编译错误 [英] Compilation errors when stepping over breakpoints
问题描述
每当我遇到一个断点并尝试越过断点或进入断点时,我就开始出现奇怪的错误.
I've started getting weird errors whenever I hit a breakpoint and either try to step over it or into it.
我收到消息:
进行了无法编译的编辑.在解决编译错误之前,执行无法继续.
Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed.
项目正在正常编译,当我没有遇到任何断点时,这不会发生.我正在使用Visual Studio 2019 16.3.1,这发生在我所有的解决方案中,而不仅仅是一种.我尝试了以下方法,但没有任何效果:
The projects are compiling just fine and this does not happen when I don't hit any breakpoints. I'm using Visual Studio 2019, 16.3.1 and this happens in all of my solutions, not just one. I've tried the following but nothing has worked:
- 清除我的.vs文件夹
- 重新启动Visual Studio
- 重新启动计算机
- 清洁和重建
- 删除所有断点并再次添加它们
- 所有建议的答案我还能尝试什么?
更新:我遵循@HansPassant的建议并禁用了编辑并继续"功能,这解决了最紧迫的问题,但似乎是一个棘手的解决方法.
Update: I followed the advice from @HansPassant and disabled Edit and Continue and that solved the most urgent problem but it seems like a hacky workaround.
推荐答案
似乎与此问题相关,他们已在16.4中修复了预览 https://developercommunity.visualstudio.com/content/problem/705494/without-any-changes-to-source-files-edits-were-mad.html?childToView=767405#comment-767405
Seems to be related to this issue that they have a preview fix for in 16.4 https://developercommunity.visualstudio.com/content/problem/705494/without-any-changes-to-source-files-edits-were-mad.html?childToView=767405#comment-767405
大家好,对于您使用编辑并继续"的经验感到抱歉.是的,我们知道了这个问题.不幸的是,存在相同症状的不同问题.我们正在努力修复所有这些问题,可能要花一些时间才能真正找到所有这些问题.
Hi everyone, we are sorry about your experience with Edit and Continue. Yes, we were aware of the issue. Unfortunately, there are different issues that share the same symptom. We are working towards fixing all of them, it might just take some time until we are able to actually track all of them down.
此特定问题的修复程序仅在16.4 Preview 3+上可用;-如果您需要有关此修复程序的更多详细信息,可以在Roslyn上进行检查: https://github.com/dotnet/roslyn/pull/38905
The fix for this particular issue will only be available at 16.4 Preview 3+; - If you want more details on the fix, you can check it out on Roslyn: https://github.com/dotnet/roslyn/pull/38905
我们怀疑这将解决编辑并继续"中发现的最常见问题,例如这张票中报告的那个.通过更新此票证,我们会在何时可供下载时通知您.
We suspect this will address the most common issues found in Edit and Continue, e.g. the one reported in this ticket. We will let you know when it's available for download by updating this same ticket.
这篇关于跨断点时出现编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!