DLL从VS2010中的模块列表中缺失 [英] DLL Missing from Modules List in VS2010

查看:211
本文介绍了DLL从VS2010中的模块列表中缺失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个包含C#和C ++代码项目的解决方案。



我经常调用C ++ DLL,这是在项目中通过P / Invoke从C#编译的。没问题。据我所知,通过 *。sln 文件以及C ++和C#文件的所有必要的调试器设置已正确设置。 注意:我经常可以调试类似的P /调用C ++代码没有问题!



当然,我想,没有加载 - 但是,打开模块窗口,我发现,我试图步骤的DLL甚至不列出!在我的C#程序中运行该函数的确使用DLL(我得到正确的输出),但是,在看模块窗口,DLL仍然不出现。



有没有人知道发生了什么?






tl; dr



我有相当数量的调试P /调用C ++的经验。然而,我希望调试的DLL甚至不会出现在Modules列表中(所以我显然不能进入它,如果VS调试器看起来完全不知道它的存在)。

解决方案

我的猜测是你没有为非托管代码打开调试。转到启动项目的Properties - > Debug选项卡。选中启用非托管代码调试。


I've really been banging my head against the proverbial wall over this one.

I have a solution which contains both C# and C++ code projects.

I often call the C++ DLLs, which are compiled in this project from the C# via P/Invoke. No problemo. All the requisite debugger settings through the *.sln file, as well as the C++ and C# files, have been properly set, to the best of my knowledge. Note: I often am able to debug similarly P/Invoked C++ code with no issues!

Naturally, I figured that, perhaps, the symbols weren't loading -- yet, upon opening the modules window, I discovered that the DLL into which I am attempting to step isn't even listed! Running the function in my C# program does indeed use the DLL(I get the correct output), but, whilst watching the Modules window, the DLL still does not appear.

Does anyone have an idea of what's going on?


tl;dr

I have a fair amount of experience with debugging P/Invoked C++. However, the DLL I wish to debug does not even appear in the Modules list(so I obviously am not able to step into it if the VS debugger appears to be completely unaware of its existence).

解决方案

My guess would be that you do not have debugging turned on for unmanaged code. Go to the Start-up project's Properties->Debug tab. Check "Enable unmanaged code debugging".

这篇关于DLL从VS2010中的模块列表中缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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