在VS2010 C++中调试DLL工程的方法

http://blog.163.com/bbluesnow@126/blog/static/277845452012123114924563/

是自己调试时候用的,还是很好用的,留下来记住。如下是步骤:

1、在“Solution Explorer”中找到要调试的dll项目,点击右键,选择Set as StartUp Project,将dll设置为调试启动项目;然后选择dll项目,点击右键,选择Properties,打开属性页设置页面;

2、在Properties 页面的中,选择Configuration Properties下拉菜单,然后选择Debugging;

3、在Debugging的页面中,在第一行Debugger to launch的下拉菜单中,如果是本地调试选择Local Windows Debugger,远程调试选择Remote Windows Debugger;

4、在Debugging的页面中,Command中选择下拉菜单,找到引用该dll的应用程序;在Command Arguments中输入$(TargetFileName),或者自己从下拉框中选择,然后在此字符串后面 输入dll文件导出的函数名:

如我有两个导出函数:CreatePlugObj()和 ReleasePlugObj() ,则应该写为:

$(TargetFileName) CreatePlugObj; ReleasePlugObj

5、在Debugging的页面中,Working Directory下拉菜单,选择当前工作目录,如Debug。

如此在dll项目要调试的代码段中设置断点,开始调试,就可以跳转到dll中的断点了

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(232) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
发布了758 篇原创文章 · 获赞 35 · 访问量 60万+

猜你喜欢

转载自blog.csdn.net/kelsel/article/details/52759147