Platform debug model

The platform debug model defines generic debug interfaces that are intended to be implemented and extended in concrete, language-specific implementations.


The model includes classes that represent different artifacts in a program under debug.  All of the artifacts implement IDebugElement in addition to their own interfaces.  The model includes definitions for the following artifacts:

Plug-ins that implement language-specific debuggers typically extend these interfaces to include language-specific behavior.  All debug elements can return the id of the plug-in that originated them.  This is important for registering other classes that are associated with a debug model, such as UI classes.


The model also includes interfaces that define a set of debug actions that are common behaviors among debug artifacts.  These interfaces are implemented by debug elements where appropriate.  They include the following actions:

If you look at the definitions for the platform debug elements, you will see that different elements implement different debug actions.  Standard interfaces for the elements and their behaviors allow the platform to provide abstract implementations of utility classes and UI support that can be extended for concrete implementations of debuggers.


Debug events (DebugEvent) are used to describe events that occur as a program is being debugged.  Debug events include the debug element that is associated with the event.  Each kind of debug element has a specific set of events that it supports as documented in DebugEvent. Debugger implementations can add application specific debug events using a designation of DebugEvent.MODEL_SPECIFIC as the kind of event. A client data field can be used in this case to add model-specific information about the event.

Debugger UI classes typically listen to specific events for elements in order display information about changes that occur in the elements.  Debug events arrive in groups called debug event sets.  Events that occur at the same point of execution in a program arrive in the same set.  Clients should implement an IDebugEventSetListener and register the listener with the org.eclipse.debug.core plug-in in order to receive debug events.