Méthode | Description | |
---|---|---|
Attach ( IDebugEventCallback2 pCallback ) : int |
Attaches to the program. A debug engine (DE) never calls this method to attach to a program. If the DE runs in the program's address space, the IDebugProgramNodeAttach2::OnAttach method is called. If the DE runs in the session debug manager's (SDM) address space, the IDebugEngine2::Attach method is called. |
|
CanDetach ( ) : int |
Determines if a debug engine (DE) can detach from the program.
|
|
CauseBreak ( ) : int |
Requests that the program stop execution the next time one of its threads attempts to run. An IDebugBreakEvent2 event is sent when the program next attempts to run code after this method is called. This method is asynchronous in that the method returns immediately without necessarily waiting for the program to stop. |
|
Detach ( ) : int |
Detaches a debug engine from the program. A detached program continues running, but it is no longer part of the debug session. No more program debug events are sent once the debug engine is detached. |
|
EnumCodeContexts ( IDebugDocumentPosition2 pDocPos, IEnumDebugCodeContexts2 &ppEnum ) : int |
Retrieves a list of the code contexts for a given position in a source file. This method allows the session debug manager (SDM) or IDE to map a source file position into a code position. More than one code context is returned if the source generates multiple blocks of code (for example, C++ templates). |
|
EnumCodePaths ( string pszHint, IDebugCodeContext2 pStart, IDebugStackFrame2 pFrame, int fSource, IEnumCodePaths2 &ppEnum, IDebugCodeContext2 &ppSafety ) : int |
Retrieves a list of the code paths for a given position in a source file. A code path describes the name of a method or function that was called to get to the current point in the execution of the program. A list of code paths represents the call stack. |
|
EnumModules ( IEnumDebugModules2 &ppEnum ) : int |
Retrieves a list of the modules that this program has loaded and is executing. A module is a DLL or assembly and is typically listed in the Modules debug window. |
|
EnumThreads ( IEnumDebugThreads2 &ppEnum ) : int |
Retrieves a list of the threads that are running in the program.
|
|
GetDebugProperty ( IDebugProperty2 &ppProperty ) : int |
Gets the program's properties. The properties returned by this method are specific to the program. If the program needs to return more than one property, then the IDebugProperty2 object returned by this method is a container of additional properties and calling the IDebugProperty2::EnumChildren method returns a list of all properties. A program may expose any number and type of additional properties that can be described through the IDebugProperty2 interface. An IDE might display the additional program properties through a generic property browser user interface. |
|
GetDisassemblyStream ( enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, IDebugDisassemblyStream2 &ppDisassemblyStream ) : int |
Gets the disassembly stream for this program or a part of this program. If the dwScopes parameter has the DSS_HUGE flag of the DISASSEMBLY_STREAM_SCOPE enumeration set, then the disassembly is expected to return a large number of disassembly instructions, for example, for an entire file or module. If the DSS_HUGE flag is not set, then the disassembly is expected to be confined to a small region, typically that of a single function. |
|
GetENCUpdate ( object &ppUpdate ) : int |
This method gets the Edit and Continue (ENC) update for this program. A custom debug engine always returns E_NOTIMPL. A custom debug engine should always return E_NOTIMPL. |
|
GetEngineInfo ( string &pbstrEngine, System.Guid &pguidEngine ) : int |
Gets the name and identifier of the debug engine (DE) running a program.
|
|
GetHostName ( enum_GETHOSTNAME_TYPE dwHostNameType, string &pbstrHostName ) : int |
Gets the name of the process hosting the program.
|
|
GetHostPid ( AD_PROCESS_ID pHostProcessId ) : int |
Gets the system process identifier for the process hosting the program.
|
|
GetMemoryBytes ( IDebugMemoryBytes2 &ppMemoryBytes ) : int |
Retrieves the memory bytes occupied by the program. The memory bytes as represented by the IDebugMemoryBytes2 object is for the program's image in memory and not any memory that was allocated when the program was executed. |
|
GetName ( string &pbstrName ) : int |
Gets the name of the program. The name returned by this method is always a friendly, user-displayable name that describes the program. |
|
GetProcess ( IDebugProcess2 &ppProcess ) : int |
Get the process that this program is running in. Unless a debug engine (DE) implements the IDebugEngineLaunch2 interface, the DE's implementation of this method should always return E_NOTIMPL because a DE cannot determine which process it is running in and therefore cannot satisfy an implementation of this method. Implementing the IDebugEngineLaunch2 interface means that the DE must know how to create a process; therefore, the DE's implementation of the IDebugProgram2 interface is able to know what process it is running in. |
|
GetProgramId ( System.Guid &pguidProgramId ) : int |
Gets a GUID for this program. A debug engine (DE) must return the program identifier originally passed to the IDebugProgramNodeAttach2::OnAttach or IDebugEngine2::Attach methods. This allows identification of the program across debugger components. |
|
GetProgramName ( string &pbstrProgramName ) : int |
Gets the name of the program. The name of a program is not the same thing as the path to the program, although the name of the program may be part of such a path. |
|
OnAttach ( System.Guid &guidProgramId ) : int |
Attaches to the associated program or defers the attach process to the IDebugEngine2::Attach method. This method is called during the attach process, before the IDebugEngine2::Attach method is called. The OnAttach method can perform the attach process itself (in which case, this method returns S_FALSE) or defer the attach process to the IDebugEngine2::Attach method (the OnAttach method returns S_OK). In either event, the OnAttach method can set the GUID of the program being debugged to the given GUID. |
|
Stop ( ) : int |
Stops all threads running in this program. This method is called when this program is being debugged in a multi-program environment. When a stopping event from some other program is received, this method is called on this program. The implementation of this method should be asynchronous; that is, not all threads should be required to be stopped before this method returns. The implementation of this method may be as simple as calling the IDebugProgram2::CauseBreak method on this program. No debug event is sent in response to this method. |
|
Terminate ( ) : int |
Terminates the program. If possible, the program will be terminated and unloaded from the process; otherwise, the debug engine (DE) will perform any necessary cleanup.[ This method or the IDebugProcess2::Terminate method is called by the IDE, typically in response to the user halting all debugging. The implementation of this method should, ideally, terminate the program within the process. If this is not possible, the DE should prevent the program from running any more in this process (and do any necessary cleanup). If the IDebugProcess2::Terminate method was called by the IDE, the entire process will be terminated sometime after the IDebugProgram2::Terminate method is called. |
|
WatchForExpressionEvaluationOnThread ( IDebugProgram2 pOriginatingProgram, uint dwTid, uint dwEvalFlags, IDebugEventCallback2 pExprCallback, int fWatch ) : int |
Allows (or disallows) expression evaluation to occur on the given thread, even if the program has stopped. When the session debug manager (SDM) asks a program, identified by the pOriginatingProgram parameter, to evaluate an expression, it notifies all other attached programs by calling this method. Expression evaluation in one program may cause code to run in another, due to function evaluation or evaluation of any IDispatch properties. Because of this, this method allows expression evaluation to run and complete even though the thread may be stopped in this program. |
|
WatchForThreadStep ( IDebugProgram2 pOriginatingProgram, uint dwTid, int fWatch, uint dwFrame ) : int |
Watches for execution (or stops watching for execution) to occur on the given thread. When the session debug manager (SDM) steps a program, identified by the pOriginatingProgram parameter, it notifies all other attached programs by calling this method. This method is applicable only to same-thread stepping. |
|
WriteDump ( enum_DUMPTYPE DUMPTYPE, string pszDumpUrl ) : int |
Writes a dump to a file. A program dump would typically include the current stack frame, the stack itself, a list of the threads running in the program, and possibly any memory that the program owns. |
Méthode | Description | |
---|---|---|
Attach_V7 ( IDebugProgram2 pMDMProgram, IDebugEventCallback2 pCallback, uint dwReason ) : int | ||
Continue ( IDebugThread2 pThread ) : int | ||
DetachDebugger_V7 ( ) : int | ||
Execute ( ) : int | ||
GetHostMachineName_V7 ( string &pbstrHostMachineName ) : int | ||
Step ( IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step ) : int |
public Attach ( IDebugEventCallback2 pCallback ) : int | ||
pCallback | IDebugEventCallback2 | An IDebugEventCallback2 object to be used for debug event notification. |
Résultat | int |
public EnumCodeContexts ( IDebugDocumentPosition2 pDocPos, IEnumDebugCodeContexts2 &ppEnum ) : int | ||
pDocPos | IDebugDocumentPosition2 | An IDebugDocumentPosition2 object representing an abstract position in a source file known to the IDE. |
ppEnum | IEnumDebugCodeContexts2 | Returns an IEnumDebugCodeContexts2 object that contains a list of the code contexts. |
Résultat | int |
public EnumCodePaths ( string pszHint, IDebugCodeContext2 pStart, IDebugStackFrame2 pFrame, int fSource, IEnumCodePaths2 &ppEnum, IDebugCodeContext2 &ppSafety ) : int | ||
pszHint | string | The word under the cursor in the Source or Disassembly view in the IDE. |
pStart | IDebugCodeContext2 | An IDebugCodeContext2 object representing the current code context. |
pFrame | IDebugStackFrame2 | An IDebugStackFrame2 object representing the stack frame associated with the current breakpoint. |
fSource | int | Nonzero (TRUE) if in the Source view, or zero (FALSE) if in the Disassembly view. |
ppEnum | IEnumCodePaths2 | Returns an IEnumCodePaths2 object containing a list of the code paths. |
ppSafety | IDebugCodeContext2 | Returns an IDebugCodeContext2 object representing an additional code context to be set as a breakpoint in case the chosen code path is skipped. This can happen in the case of a short-circuited Boolean expression, for example. |
Résultat | int |
public EnumModules ( IEnumDebugModules2 &ppEnum ) : int | ||
ppEnum | IEnumDebugModules2 | Returns an IEnumDebugModules2 object that contains a list of the modules. |
Résultat | int |
public EnumThreads ( IEnumDebugThreads2 &ppEnum ) : int | ||
ppEnum | IEnumDebugThreads2 | Returns an IEnumDebugThreads2 object that contains a list of the threads. |
Résultat | int |
public GetDebugProperty ( IDebugProperty2 &ppProperty ) : int | ||
ppProperty | IDebugProperty2 | Returns an IDebugProperty2 object that represents the program's properties. |
Résultat | int |
public GetDisassemblyStream ( enum_DISASSEMBLY_STREAM_SCOPE dwScope, IDebugCodeContext2 pCodeContext, IDebugDisassemblyStream2 &ppDisassemblyStream ) : int | ||
dwScope | enum_DISASSEMBLY_STREAM_SCOPE | Specifies a value from the DISASSEMBLY_STREAM_SCOPE enumeration that defines the scope of the disassembly stream. |
pCodeContext | IDebugCodeContext2 | An IDebugCodeContext2 object that represents the position of where to start the disassembly stream. |
ppDisassemblyStream | IDebugDisassemblyStream2 | Returns an IDebugDisassemblyStream2 object that represents the disassembly stream. |
Résultat | int |
public GetENCUpdate ( object &ppUpdate ) : int | ||
ppUpdate | object | Returns an internal interface that can be used to update this program. |
Résultat | int |
public GetEngineInfo ( string &pbstrEngine, System.Guid &pguidEngine ) : int | ||
pbstrEngine | string | Returns the name of the DE running the program (C++-specific: this can be a null pointer indicating that the caller is not interested in the name of the engine). |
pguidEngine | System.Guid | Returns the globally unique identifier of the DE running the program (C++-specific: this can be a null pointer indicating that the caller is not interested in the GUID of the engine). |
Résultat | int |
public GetHostName ( enum_GETHOSTNAME_TYPE dwHostNameType, string &pbstrHostName ) : int | ||
dwHostNameType | enum_GETHOSTNAME_TYPE | A value from the GETHOSTNAME_TYPE enumeration that specifies the type of name to return. |
pbstrHostName | string | Returns the name of the hosting process. |
Résultat | int |
public GetHostPid ( AD_PROCESS_ID pHostProcessId ) : int | ||
pHostProcessId | AD_PROCESS_ID | Returns the system process identifier for the hosting process. |
Résultat | int |
public GetMemoryBytes ( IDebugMemoryBytes2 &ppMemoryBytes ) : int | ||
ppMemoryBytes | IDebugMemoryBytes2 | Returns an IDebugMemoryBytes2 object that represents the memory bytes of the program. |
Résultat | int |
public GetName ( string &pbstrName ) : int | ||
pbstrName | string | Returns the name of the program. |
Résultat | int |
public GetProcess ( IDebugProcess2 &ppProcess ) : int | ||
ppProcess | IDebugProcess2 | Returns the IDebugProcess2 interface that represents the process. |
Résultat | int |
public GetProgramId ( System.Guid &pguidProgramId ) : int | ||
pguidProgramId | System.Guid | Returns the GUID for this program. |
Résultat | int |
public GetProgramName ( string &pbstrProgramName ) : int | ||
pbstrProgramName | string | Returns the name of the program. |
Résultat | int |
public OnAttach ( System.Guid &guidProgramId ) : int | ||
guidProgramId | System.Guid | GUID to assign to the associated program. |
Résultat | int |
public WatchForExpressionEvaluationOnThread ( IDebugProgram2 pOriginatingProgram, uint dwTid, uint dwEvalFlags, IDebugEventCallback2 pExprCallback, int fWatch ) : int | ||
pOriginatingProgram | IDebugProgram2 | An IDebugProgram2 object representing the program that is evaluating an expression. |
dwTid | uint | Specifies the identifier of the thread. |
dwEvalFlags | uint | A combination of flags from the EVALFLAGS enumeration that specify how the evaluation is to be performed. |
pExprCallback | IDebugEventCallback2 | An IDebugEventCallback2 object to be used to send debug events that occur during expression evaluation. |
fWatch | int | If non-zero (TRUE), allows expression evaluation on the thread identified by dwTid; otherwise, zero (FALSE) disallows expression evaluation on that thread. |
Résultat | int |
public WatchForThreadStep ( IDebugProgram2 pOriginatingProgram, uint dwTid, int fWatch, uint dwFrame ) : int | ||
pOriginatingProgram | IDebugProgram2 | An IDebugProgram2 object representing the program being stepped. |
dwTid | uint | Specifies the identifier of the thread to watch. |
fWatch | int | Non-zero (TRUE) means start watching for execution on the thread identified by dwTid; otherwise, zero (FALSE) means stop watching for execution on dwTid. |
dwFrame | uint | Specifies a frame index that controls the step type. When this is value is zero (0), the step type is "step into" and the program should stop whenever the thread identified by dwTid executes. When dwFrame is non-zero, the step type is "step over" and the program should stop only if the thread identified by dwTid is running in a frame whose index is equal to or higher on the stack than dwFrame. |
Résultat | int |
public WriteDump ( enum_DUMPTYPE DUMPTYPE, string pszDumpUrl ) : int | ||
DUMPTYPE | enum_DUMPTYPE | A value from the DUMPTYPE enumeration that specifies the type of dump, for example, short or long. |
pszDumpUrl | string | The URL to write the dump to. Typically, this is in the form of file://c:\path\filename.ext, but may be any valid URL. |
Résultat | int |