Debugging a Running Process

原文链接:http://msdn.microsoft.com/en-us/library/windows/desktop/ms679301%28v=vs.85%29.aspx

本文链接:http://blog.csdn.net/wlsgzl/article/details/18714945

To debug a process that is already running, the debugger should use DebugActiveProcess with the process identifier. 要调试一个已经运行的进程,调试器应该使用附带进程ID的DebugActiveProcess函数。To retrieve a list of process identifiers, use either the EnumProcesses or Process32First function.要想获得进程ID列表,可以使用EnumProcesses或Process32First函数。

DebugActiveProcess attaches the debugger to the active process. DebugActiveProcess函数将调试器附加到活动的进程。In this case, only the active process can be debugged; its child processes cannot. 在这种情形下,只有当前活动进程是可调试的,其子进程是不可调试的。The debugger must have appropriate access to the executing process to use DebugActiveProcess. 使用DebugActiveProcess函数时,调试器必须对正在执行的程序拥有适当的访问权限。For more information about access rights, see Access Control.关于访问权限的更多信息,参见Access Control。

After the debugger has either created or attached itself to the process it intends to debug, the system notifies the debugger of all debugging events that occur in the process, and, if specified, in any child processes.当调试器创建了一个要调试的进程或者把自己附加到要调试的进程上后,系统通知调试器发生在进程中的所有调试事件,如果指定了子进程,子进程的也是可以通知的。 For more information about debugging events, see Debugging Events.关于调试事件的更多信息,参见Debugging Events。

To detach from the process being debugged, the debugger should use the DebugActiveProcessStop function.想要从被调试的进程上剥离,调试器需要调用DebugActiveProcessStop函数。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值