Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/146.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Visual Studio调试器未在C++;托管应用程序中的异常_C#_C++_Visual Studio Debugging - Fatal编程技术网

C# Visual Studio调试器未在C++;托管应用程序中的异常

C# Visual Studio调试器未在C++;托管应用程序中的异常,c#,c++,visual-studio-debugging,C#,C++,Visual Studio Debugging,我得到一个例外: Exception thrown: read access violation. this->LabelProperty-> was 0xFF...FF2F If there is a handler for this exception, the program may be safely continued. VisualStudio在C++中停止,并突出显示LabelProperty不存在的行,并位于C++ DLL中。如何让VisualStudio正确

我得到一个例外:

Exception thrown: read access violation.

this->LabelProperty-> was 0xFF...FF2F

If there is a handler for this exception, the program may be safely continued.

VisualStudio在C++中停止,并突出显示LabelProperty不存在的行,并位于C++ DLL中。如何让VisualStudio正确地调试它,因为目前它没有正确地显示源代码行


我已在顶级应用程序上选中“启用本机代码调试”。是否需要在所有程序集上设置此项?< /P>是否将本机调试器附加到进程中,除了托管代码(即<代码>本地< /代码> > <代码>调试> >代码> ->代码>附加到进程< /代码> ->代码>附加到 >?读访问违规不是由C++代码抛出的例外。当您尝试取消引用包含无效位置地址的指针时,系统会引发异常。从您的描述中,听起来好像问题在C代码中,所以调试器的行为在那里停止是很有意义的。异常发生在DLL,它是C++ DLL。如果我继续这样说:APX.ExC++中的0x00 00 7FF…08(App.dll)未处理的异常。刚刚在VS 2015和一些示例代码中实现了这一点。当提到代码引发异常时,这意味着代码有一个
throw
语句。这不是在这里发生的。正如我所说,读访问冲突是由操作系统引起的。但是,好的,在C++ DLL中响应异常代码而引发异常。因此,问题是您的开发环境配置不正确。大约有十几种不同的可能性,太多了,我无法推测。混合模式调试对我来说很好,在无数版本的VisualStudio上都有。我们需要更多的信息来减少猜测。