2

在 Visual Studio 2015 调试会话(断点命中)期间,如果我更改几乎所有代码并选择ContinueStep IntoStep Over(等)命令中的任何一个,我会立即收到ExecutionEngineException ,然后是 CLR 崩溃。

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

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

如何解决此问题?

4

2 回答 2

3

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

看起来问题出在 + + 和这段代码的组合上:

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

在 处放置断点End Sub,停在它处,交换分配并将下一条语句设置为第一个分配。繁荣。

向微软报告。解决方法是使用及更高版本。

于 2015-09-28T17:25:53.243 回答
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 上正常运行,只是很少崩溃。)

这种行为对于许多项目都是正确的。

于 2016-03-05T19:35:38.613 回答