IDebugCanStopEvent2::GetReason

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the reason why the debug engine (DE) wants to stop.

Syntax

HRESULT GetReason( 
   CANSTOP_REASON* pcr
);
int GetReason( 
   out enum_CANSTOP_REASON pcr
);

Parameters

pcr
[out] Returns a value from the CANSTOP_REASON enumeration that describes the reason for this event.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

This method is typically called before the CanStop method so the caller can determine whether to pass non-zero (TRUE) to the IDebugCanStopEvent2::CanStop method.

The reason for stopping can be either CANSTOP_ENTRYPOINT, which means the DE has reached an entry point, or CANSTOP_STEPIN, which means the DE has stepped into a function.

See also