Automatically attaching a debugger to a process every time it is launched

来源:互联网 发布:linux ls -l 编辑:程序博客网 时间:2024/05/22 12:03

Windows有一个叫机制可以帮助我们自动触发 任意可执行文件 的debug操作,可以看考http://blogs.msdn.com/b/greggm/archive/2005/02/21/377663.aspx

 

 注意这段:

 “On Win 64, there are two copies of HKEY_LOCAL_MACHINE/Software (one for 32-bit apps, and one for 64-bit apps), and therefore there are two copies of these options. However, where the operating system looks isn't dependent on the bit-ness of the application that is going to be debugged (which is what you would probably expect). Instead, it is dependent on the bit-ness of the application that called CreateProcess.”.

如果我们需要在Win64下启动debug的功能,我们需要修改在Wow6432Node 目录下的注册表。

 

  注意,我们有几种方法来启动debugger: 通过vsjitdebugger.exe 或者 devenv /debugexe:

http://msdn.microsoft.com/en-us/library/a329t4ed(v=VS.80).aspx

http://msdn.microsoft.com/en-us/library/a329t4ed(vs.71).aspx

  后一个着重讲述了一些特殊的设置,如果 需要debug进城 和 当前的进城 在用一个目录下的情况。