IDebugEngine2:: CreatePendingBreakpoint

在调试引擎 (DE)创建挂起的断点。

HRESULT CreatePendingBreakpoint( 
   IDebugBreakpointRequest2*  pBPRequest,
   IDebugPendingBreakpoint2** ppPendingBP
);
int CreatePendingBreakpoint( 
   IDebugBreakpointRequest2     pBPRequest,
   out IDebugPendingBreakpoint2 ppPendingBP
);

参数

返回值

如果成功,则返回; S_OK否则,返回错误代码。 通常返回 E_FAIL ,如果 pBPRequest 参数不匹配 DE 支持的任何语言,如果 pBPRequest 参数无效或不完整。

备注

挂起断点实质上是所需的所有信息的集合绑定断点代码。 从此方法返回的挂起的断点将不一定代码,直到 IDebugPendingBreakpoint2:: 绑定 方法调用。

对于每个挂起的断点用户集,会议调试管理器 (SDM)对每个附加 DE 的此方法。 将由验证的、断点用于运行该 DE 的过程是有效的。

当用户将在某行代码中设置断点, DE 可以自由绑定断点到对应于此代码的文档的最接近的行。 这使得用户可以在一个多行语句的第一行中设置断点,但是,将其绑定在最后一行 (其中所有代码在调试信息特性化)。

示例

下面的示例演示如何执行简单的 CProgram 对象的方法。 IDebugEngine2::CreatePendingBreakpoint 的 DE 的实现可以转发对的所有调用方法实现在每个程序中。

HRESULT CProgram::CreatePendingBreakpoint(IDebugBreakpointRequest2* pBPRequest, IDebugPendingBreakpoint2** ppPendingBP)   
{  
     
   // Create and initialize the CPendingBreakpoint object.
   CComObject<CPendingBreakpoint> *pPending;  
   CComObject<CPendingBreakpoint>::CreateInstance(&pPending);  
   pPending->Initialize(pBPRequest, m_pInterp, m_pCallback, m_pEngine);  
   return pPending->QueryInterface(ppPendingBP);  
}  

请参见

参考

IDebugEngine2

IDebugPendingBreakpoint2:: 绑定

IDebugBreakpointRequest2

IDebugPendingBreakpoint2