How to debug a managed BHO from Visual Studio 2010

青春壹個敷衍的年華 提交于 2019-12-06 01:59:51

问题


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

  1. Start IE outside VS
  2. From VS (Debug => Attach) Attach to the process "iexplore.exe"

Trying to do the following:

  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

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

Any tip?


回答1:


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

  1. File -> Open -> Project/Solution
  2. Change type to exe file
  3. Open c:\program files\internet explorer\iexplore.exe

then, open project property:

  1. There is only one 'General' tab
  2. Change Debugger Type to 'Managed v4.0'

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.



来源:https://stackoverflow.com/questions/8629976/how-to-debug-a-managed-bho-from-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!