【发布时间】:2019-08-07 05:20:57
【问题描述】:
Visual Studio 2019 允许我在应用程序正在运行/正在调试且未暂停时编辑 C# 源代码文件。当应用程序暂停并且我尝试重新启动它时,这会导致错误。
当应用程序处于调试模式且未暂停时,如何阻止 Visual Studio 让我编辑文件?
我什至不知道有可能启用这样的东西。
更新:VS2019 现在在我调试时崩溃到桌面。我在引用编辑并继续的 Windows 事件日志中看到以下错误。我该如何解决这个问题?
> "Application: devenv.exe Framework Version: v4.0.30319 Description:
> The process was terminated due to an unhandled exception. Exception
> Info: System.NullReferenceException at
> Microsoft.VisualStudio.LanguageServices.EditAndContinue.VisualStudioDebugStateChangeListener+DebuggerService.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad(Microsoft.VisualStudio.Debugger.DkmModuleInstance,
> Microsoft.VisualStudio.Debugger.DkmWorkList,
> Microsoft.VisualStudio.Debugger.DkmEventDescriptorS) at
> Microsoft.VisualStudio.Debugger.EntryPoint.IDkmModuleInstanceLoadNotification_OnModuleInstanceLoad(IntPtr,
> IntPtr, IntPtr, IntPtr)
【问题讨论】:
-
是的,我没有找到答案,因为这不是一个常见问题。我还查看了微软论坛和支持票。
-
我不想禁用“编辑并继续”,我想要那个功能。似乎编辑和继续被破坏,编辑和继续应该只有在应用程序暂停时才能工作。就我而言,只要应用程序运行,我就可以编辑和(不会继续崩溃)。
-
也许this帮助
-
更新了一个新的崩溃。 VS2019 现在变砖了。
-
我讨厌的一件事是,如果我在运行时编辑文件,我将无法再停止它并进行编辑,因为源代码和运行代码不再匹配。这是一个严重的问题,能否请您添加指向您开始的其他主题的链接,以便如果这个问题没有得到答案,我们可以尝试跟上?
标签: c# visual-studio ide visual-studio-2019