调试非托管代码在调试托管代码 [英] Debugging unmanaged code while debugging managed code

查看:363
本文介绍了调试非托管代码在调试托管代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.NET 3.5的应用我的工作是由一群不同的解决方案的。有些解决方案包括托管代码(C#)等都有非托管代码(C ++)。用C#编写的方法用C ++写的那些通信。我试图跟踪这些不同功能之间的依赖关系,我想在设置解决断点由我的C ++函数。其中C#的解决方案有启动项目。我在调试模式下,该解决方案与我的非托管代码断点将受到重创,但没有真正发生的期望。有人可以指导我通过使用Visual Studio IDE调试混合应用,如这些过程?

The .NET 3.5 application I am working on consists of bunch of different solutions. Some of these solutions consist of managed code(C#) and others have unmanaged code(C++). Methods written in C# communicate with the ones written in C++. I am trying to trace the dependencies between these various functions and I thought setting breakpoints on the solution consisting my C++ functions. One of the C# solutions have the startup project. I run this solution in debug mode with the expectation that the breakpoints in my unmanaged code will be hit but nothing really happens. Can somebody guide me through the process of debugging mixed applications such as these using the Visual Studio IDE?

感谢

推荐答案

默认情况下托管项目才会开始启用托管调试调试器。它不认为有在同一溶液中的非托管项目。为了调试都需要明确启用非托管代码调试。

By default a managed project will only start the debugger with managed debugging enabled. It doesn't consider that there are unmanaged projects in the same solution. In order to debug both you need to explicitly enable unmanaged code debugging.


  • 右键单击该项目,并选择属性

  • 转至调试标签

  • 选中启用非托管代码调试

这篇关于调试非托管代码在调试托管代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆