2

在Visual Studio的2015年调试会话(断点命中),如果我改变几乎任何代码,选择任何继续步骤进入,步骤(等),命令,我立即得到ExecutionEngineException,然后CLR崩溃。CLR崩溃时调试(“编辑并继续”)中代码更改之后Debug.SetNextStatement

这似乎只出现在一个项目中。

System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason, int pvLoopData) Unknown 
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) Unknown 
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown 
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext context) Unknown 
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() Unknown 
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() Unknown 
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(string[] commandLine) Unknown 
[Native to Managed Transition] 
[Managed to Native Transition] 
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) Unknown 
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() Unknown 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) Unknown 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown 
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown 

如何解决此问题?

回答

3

我通过最小化问题场景找到答案。

看起来这个问题是组合 + + 和验证码:在End Sub

Public Class Form1 
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 
     Dim gridSize As Size = New Size(3, 11) 
     Dim z As Integer 
     z = 22 
     z = 1 
    End Sub 
End Class 

广场断点,停止吧,交换分配和设置下一条语句的第一项任务。繁荣。

Reported给微软。解决方法是使用及更高版本。

1

我在C#中的Visual Studio Community 2015中遇到同样的问题。 当为.Net 3.5编译的项目进行调试时,遇到断点并执行“编辑并继续”时,它很少能够存活。编译器/ IDE崩溃时会出现几个可能的错误消息之一,最常见的情况是ExecutionEngineException,然后是CLR崩溃。

当同一个项目编译为.net 4.6.1时,VS 2015 IDE调试器运行正常。将主项目设置为.net 4.6.1就足够了;即使它们仍然是.net 3.5,调用的.dll也是可调试的。

(旧VS 2013的IDE调试器和.NET 3.5操作正确,只有很少坠毁。)

此行为是真正的许多项目。

+0

你的答案是由某人downvoted,因为它实际上不回答这个问题。 **请考虑删除**或更改它。如果你想添加真实的答案,请*回答顶部问题*。这是[so]的工作原理。如果出现这个错误,你也可以[在错误报告上投票](https://connect.microsoft.com/VisualStudio/feedback/details/1844855/clr-crash-executionengineexception-thrown-on-debuggers-edit-和继续为网络3-5)在微软。 – miroxlav

+0

在我看来,这个答案与原始海报的答案基本相同,即使用更高版本的.net。我不同意投下一个企图答案。总会有一个“最好”的答案选择,但事实上这并不是最佳答案,并不是投票的有效理由。很明显,这个答案至少和原始海报选择的答案一样有用,没有其他人有更好的答复。 – shawn1874