在C#中调试C ++ dll [英] Debug c++ dll in C#

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

问题描述

我有一个来自c ++的.dll,我想用C#对其进行调试,但我不知道该怎么做.

当我编译c ++项目时,Visual Studio要求我执行一个".exe".

我以为我必须创建一个项目来执行dll.

但是我迷路了,我该如何调试呢?

解决方案

如果我正确理解您的意思,您想在调用DLL的C#项目中调试您创建的C ++编码DLL吗?/p>

我之前已经进入C#项目属性,并且在调试"部分下,选中了启用非托管代码调试"复选框,以完成此操作.这应该可以让您进入C ++ DLL.

I have a .dll from c++ and I want to debug it in C#, but I don't know how to.

When I compiled the c++ project, Visual studio asked me to execute an ".exe".

I supposed that I had to create a project to execute the dll.

But I am lost, how could I debug it?

解决方案

If I understand you correctly, you want to debug a C++ coded DLL that you created, in a C# project that calls the DLL, which you also created?

I've done this before by going into your C# project properties, and under the Debug section, checking the "Enable unmanaged code debugging" check box. This should allow you to step into your C++ DLL.

这篇关于在C#中调试C ++ dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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