如何从Visual Studio 2010调试托管BHO [英] How to debug a managed BHO from Visual Studio 2010

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

问题描述

我有一个托管的Explorer栏(在Internet Explorer中工作),运作良好。当前,调试它的唯一方法是:

I've a managed Explorer Bar (working in Internet Explorer) that is working reasonably well. Currently, the only way to debug it:


  1. 在VS外部启动IE

  2. 从VS(调试=>附加)附加到进程 iexplore.exe

尝试执行以下操作:


  1. 转到项目属性=>调试选项卡

  2. 启动外部程序: c:\程序文件(x86)\ \internetexplorer\iexplore.exe

  3. 命令行参数:about:blank

  4. 命中 F5

  1. Go to Project Properties => Debug tab
  2. Start External Program: c:\program files (x86)\internet explorer\iexplore.exe
  3. Command line argument: about:blank
  4. Hit F5

第一种方法非常麻烦。使用第二种方法,iexplore会启动,但是调试器无法识别断点,也不知道为什么。

The first method is very cumbersome. With the second method, iexplore starts, but the debugger doesn't recognize the breakpoints, don't know why.

任何提示?

推荐答案

所以...在我打开此问题3个月后,这里是答案。
在Visual Studio中,将EXE作为新项目打开:

So ... 3 months after I opened this question, here is the answer. In Visual Studio, open an EXE as a new project:


  1. 文件->打开->项目/解决方案

  2. 将类型更改为exe文件

  3. 打开c:\程序文件\internet Explorer\iexplore.exe

然后打开项目属性:


  1. 只有一个常规标签

  2. 将调试器类型更改为 Managed v4.0

就是这样。 F5 现在可以使用。您可以将此EXE项目添加到包含托管bho的解决方案中,并将EXE项目设置为启动项目。

That's it. F5 will now work. You can add this EXE project to the solution that contains your managed bho, and set the EXE project to be the Startup project.

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

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