调试Visual Studio 2010的DLL项目 [英] Debugging Visual Studio 2010 DLL Project

查看:117
本文介绍了调试Visual Studio 2010的DLL项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从调试Visual Studio 2010中我试图按照这些指令的C / C ++本地DLL项目:
http://msdn.microsoft.com/en-美国/库/ c91k1xcf(v = VS.100)的.aspx

我想使用内置的调试器,并能够加强code,检查结构等,我会用一个普通.exe项目做。上述网页上的说明描述下的调试类的配置属性,我没有看到。

HTT号码://img707.imageshack.us/img707/4402/lalasz.png(删除空格)

只需pressing F5调试导致以下错误:

 无法启动程序C:\\用户\\ ....... Test.dll的

我用调试器进行定期的.exe项目很多次,它工作正常,在此计算机上。我不知道如果我只是失去了一些东西很明显,现在虽然。

编辑:由于我没有做它从一开始就清​​楚了,我想的Visual Studio给LoadLibrary我的DLL成存根的过程,让我在调试从那里源级别,很像OllyDbg的是怎么做的。

我的DLL是不是也有不少的功能要出口,并呼吁类型。相反,它做了开关/箱中的DllMain和DLL_PROCESS_ATTACH将产生一个新的线程。因此,所有我需要的Visual Studio做的是我的DLL加载到存根可执行文件,允许我设置断点,等等。


解决方案

您右键单击在解决方案资源管理器窗口中的解决方案的名称,得到了溶液性质。请注意,窗口说:解决方案测试属性页。

右键点击项目名称(测试粗体),而不是设置项目选项。

I'm trying to debug a C/C++ native DLL project from Visual Studio 2010. I'm attempting to follow these instructions: http://msdn.microsoft.com/en-us/library/c91k1xcf(v=VS.100).aspx

I want to use the built-in debugger and be able to step code, examine structures, etc. as I would do with a regular .exe project. The instructions on the page above describe a Debugging category under Configuration Properties which I do not see.

htt p://img707.imageshack.us/img707/4402/lalasz.png (remove space)

Just pressing F5 to debug results in the following error:

Unable to start program 'C:\Users\.......Test.dll'

I've used the debugger for regular .exe projects many times and it works fine on this computer. I'm not sure if I'm just missing something very obvious right now though.

Edit: Since I didn't make it clear from the start, I want Visual Studio to LoadLibrary my DLL into a stub process and let me debug at a source level from there, much like how OllyDbg does it.

My DLL is not the type that holds a bunch of functions to be exported and called. Instead it does a switch/case in the DllMain and on DLL_PROCESS_ATTACH will spawn a new thread. Therefore all I need Visual Studio to do is to load my DLL into a stub executable and allow me to set breakpoints, etc.

解决方案

You right-clicked the solution name in the Solution Explorer window and got the solution properties. Note that the window says "Solution Test Property Pages".

Right-click the project name (Test in bold) instead to set the project options.

这篇关于调试Visual Studio 2010的DLL项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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