Control events
Applies to: Visual Studio Visual 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
You must send events during the controlled execution of your program. All of the events are sent using the IDebugEvent2 interface and have attributes that require you to implement the IDebugEvent2::GetAttributes method.
Additional methods
Some events require implementation of additional methods, as follows:
Sending the IDebugEngineCreateEvent2 interface when the debug engine (DE) is initialized requires you to implement the IDebugEngineCreateEvent2::GetEngine method.
Execution control requires implementation of such control events as the IDebugBreakEvent2 andIDebugStepCompleteEvent2 interfaces. IDebugBreakEvent2 is required only for asynchronous breaks.
Stepping into functions requires implementation of the IDebugStepCompleteEvent2 interface and its methods.
Events deriving from breakpoints require implementation of the IDebugBreakpointErrorEvent2, IDebugBreakpointEvent2, and IDebugBreakpointBoundEvent2 interfaces, as well as the IDebugBreakpointBoundEvent2::GetPendingBreakpoint and EnumBoundBreakpoints methods.
Asynchronous expression evaluation requires you to implement the IDebugExpressionEvaluationCompleteEvent2 interface and its IDebugExpressionEvaluationCompleteEvent2::GetExpressionand GetResult methods.
Synchronous events require implementing the IDebugEngine2::ContinueFromSynchronousEvent method.
For your engine to write string-style output, you must implement the IDebugOutputStringEvent2::GetString method.