查看对象时,VS 2015 VB调试会崩溃

时间:2018-08-02 22:27:17

标签: vb.net debugging visual-studio-2015

我有一个用VB编写的解决方案(带有一个C#项目),我试图在Visual Studio 2015中进行调试。当我遇到断点并将鼠标悬停在一个对象上时,代码崩溃并显示以下错误:

The program '[18348] MRS.ProductSupport.UI.vshost.exe' has exited with code -2147023895 (0x800703e9).

我无法找到与此错误相关的任何信息,也无法找到导致这种情况的原因。有些站点说这是IIS问题。我的代码确实使用了Web服务,但是我正在调试的代码部分没有调用它。

奇怪的是,我可以查看对象的属性而不会崩溃。例如,我有以下对象:

item.FeatureID

我可以将鼠标悬停在FeatureID上并获得一个值。如果将鼠标悬停在item上,代码将崩溃。我已经使用Debug.WriteLine尝试调试,但这是理想的。我正在使用Debug来查看项目属性,但无法检查整个对象。

这以前是一个间歇性问题,但是我的系统已更新到Windows 10,现在看来,当我查看它时,任何对象都导致代码崩溃。

仅说明一下,如果没有断点,代码将运行。我没有处理空对象。我确实尝试进入“属性”->“调试”,并检查“启用本机代码调试”没有成功。我的目标是.NET 4。


更新:

在我的一个测试会话中,Visual Studio崩溃了。当我重新打开它时,我能够访问该对象并查看所有属性。我使用了确切的断点,并像以前一样检查了确切的对象。但是,下次运行时,代码再次崩溃。我退出了Visual Studio,然后重新启动,但是这次问题没有得到解决。

我确实从VS的单独实例附加了调试过程,并且能够捕获以下错误:

Exception thrown at 0x768DDDC2 (KernelBase.dll) in devenv.exe: 0x80010108: The object invoked has disconnected from its clients (parameters: 0x2FD31E30).
    The thread 0x56ac has exited with code 0 (0x0).
    The thread 0x547c has exited with code 0 (0x0).
    The thread 0x55f4 has exited with code 0 (0x0).
    OnException: filter exception.
    Microsoft.VisualStudio.Debugger.DkmException: Error in the application.
       at Microsoft.VisualStudio.VIL.VisualStudioHost.VilEvaluationServices.EvaluateToString(DkmInspectionContext inspectionContext, VilEvaluationResult evalResult)
       at VSDebugEngine.ClrInspector.EntryPoint.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmClrValueInspectionCallback.EvaluateToString(DkmClrValue clrValue, DkmInspectionContext inspectionContext)
       at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrValueInspectionCallback_EvaluateToString(IntPtr pvClassInfo, IntPtr ClrValue, IntPtr InspectionContext, IntPtr& Result)'devenv.exe' (Win32): Unloaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll'
    The thread 0x55e8 has exited with code 0 (0x0).
    OnException: filter exception.
    Microsoft.VisualStudio.Debugger.DkmException: Error in the application.
       at XapiExceptionProcessing.ThrowHR(Int32 code)
       at Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.EvaluateToString(DkmInspectionContext InspectionContext)
       at Microsoft.CodeAnalysis.ExpressionEvaluator.Formatter.GetValueString(DkmClrValue value, DkmInspectionContext inspectionContext, ObjectDisplayOptions options, GetValueFlags flags)
       at Microsoft.CodeAnalysis.ExpressionEvaluator.Formatter.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmClrFormatter.GetValueString(DkmClrValue value, DkmInspectionContext inspectionContext, ReadOnlyCollection`1 formatSpecifiers)
       at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrFormatter_GetValueString(IntPtr pvClassInfo, IntPtr ClrValue, IntPtr InspectionContext, IntPtr FormatSpecifiers, IntPtr& ValueString)The thread 0x2ccc has exited with code 0 (0x0).
    OnException: filter exception.
    Microsoft.VisualStudio.Debugger.DkmException: Error in the application.
       at XapiExceptionProcessing.ThrowHR(Int32 code)
       at Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.GetValueString(DkmInspectionContext InspectionContext, ReadOnlyCollection`1 FormatSpecifiers)
       at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.GetResult(DkmInspectionContext inspectionContext, EvalResultDataItem dataItem, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, String displayName, String displayValue, String displayType, EvalResultDataItem parent)
       at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.GetResultAndContinue(EvalResultDataItem dataItem, WorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, DkmInspectionContext inspectionContext, EvalResultDataItem parent, CompletionRoutine`1 completionRoutine)
       at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.GetRootResultAndContinue(DkmClrValue value, WorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, DkmInspectionContext inspectionContext, String name, CompletionRoutine`1 completionRoutine)
       at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmClrResultProvider.GetResult(DkmClrValue value, DkmWorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, DkmInspectionContext inspectionContext, ReadOnlyCollection`1 formatSpecifiers, String resultName, String resultFullName, DkmCompletionRoutine`1 completionRoutine)
       at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrResultProvider_GetResult(IntPtr pvClassInfo, IntPtr ClrValue, IntPtr WorkList, IntPtr DeclaredType, IntPtr CustomTypeInfo, IntPtr InspectionContext, IntPtr FormatSpecifiers, IntPtr ResultName, IntPtr ResultFullName, IntPtr CompletionRoutine)Exception thrown at 0x768DDDC2 (KernelBase.dll) in devenv.exe: 0x80010108: The object invoked has disconnected from its clients (parameters: 0x2FD31D30).
    Exception thrown at 0x768DDDC2 (KernelBase.dll) in devenv.exe: 0x80010108: The object invoked has disconnected from its clients (parameters: 0x2FD31EB0).

其他信息

我在要查看的对象(名为“ item”)上运行了一个GetType,然后将其展开,并且有三个可见的异常。老实说,我不知道这是否是问题的原因,但我想我会分享,以防它帮助:

  • DeclaringMethod
  • GenericParameterAttributes
  • GenericParameterPosition

所有这三个都运行

DirectCast((item.GetType()), System.RuntimeType).DeclaringMethod

三个人都收到了System.InvalidOperationException

0 个答案:

没有答案