Package org.eclipse.debug.core


package org.eclipse.debug.core

Provides support for launching programs, breakpoint management, expression management, and debug events.

Package Specification

This package provides classes and interfaces to support facilities common among many debug architectures: launching programs, breakpoint management, expression management, and debug events. An extensible set of debug architectures and languages are supported by the definition of a "debug model" - a set of interfaces representing common artifacts in debuggable programs, which are defined in org.eclipse.debug.core.model. The debug plug-in itself does not provide an implementation of a debug model. It is intended that third parties providing an integrated set of development tools for a specific language will also implement a debug model for that language, using an underlying debug architecture of their choice. For example, Java development tooling provides an implementation of a debug model based on the standard Java Platform Debug Architecture (JPDA).

The Managers

The debug platform defines and provides an implementation of the following managers:

  • Launch Manager - The launch manager maintains the set of registered launches - that is, a collection of programs that have been launched in debuggable or non-debuggable (run) mode. Each launch contains its associated debug targets and system processes. A launch that represents a debuggable program may specify an associated source locator used to locate source elements associated with stack frames for a particular debug session. Clients may provide implementations of source locators, which are generally tied to the manner in which a program is launched.
  • Breakpoint Manager - The breakpoint manager maintains, persists, and restores the collection of all registered breakpoints in the workspace. As well, it provides change notification for breakpoints.
  • Expression Manager - The expression manager maintains a collection of registered expressions. Expressions are not automatically persisted, but a client could persist its own expressions if required.

Launch Configurations

A launch configuration is a persistable description of how to launch an application. Each launch configuration is an instance of a type of launch configuration - for example, a Java Application. The debug plug-in defines a launch configuration type extension point that clients can contribute to. A launch configuration is a set of attributes describing how to launch a program. The launching of an application is performed by an associated implementation of a launch configuration delegate, contributed by each launch configuration type extension.

A launch configuration may be stored as a file in the worksapce (and shared in a repository via standard team mechanisms), or may be stored locally, essentially making the launch configuration private for a single user.

New Features in the Debug Platform, Eclipse 3.0

Extensible Launch Modes

The debug platform supports an extensible set of launch modes. Prior releases only supported two launch modes - run and debug. The debug platform defines an extension point for contributing new launch modes (org.eclipse.debug.core.launchModes), and contributes three basic launch modes itself: run, debug, and profile. The launch manager has API to retrieve all launch modes, and a human readable label for each launch mode.

The debug platform has an extension point to support the contribution of a launch delegate for a specific launch configuration type and launch mode - org.eclipse.debug.core.launchDelegates. This allows launch configurations to be extended by third parties, to support new launch modes. For example, a client could contribute a launch delegate that launches a Java Application in profile mode (currently, the SDK does not provide a Java profiler).

For backwards compatibility, the launch delegate supplied by a launch configuration type extension is used for the launch modes specified by the launch configuration type. A launch delegate supplied for a specific mode, is used only for that mode.

Extensible Debug Events

The debug platform supports an extensible set of debug events. A debug event kind of MODEL_SPECIFIC has been added to indicate an application specific debug event. When a debug event of kind MODEL_SPECIFIC is created, the detail code in the event is client defined. The source of the event (debug element that generated the event) identifies the debug model from which the event was generated. The debug platform and user interface ignores model specific debug events.

A data field has been added to debug events to allow clients to store application specific data in debug events.

Process Factories

The debug platform provides an extension point (org.eclipse.debug.core.processFactories) for contributing process factories. A process factory can be used to override default process creation for a launch configuration when the debug plug-in creates a new process. A launch configuration can specify a process factory to use when creating a process, via the launch configuration attribute DebugPlugin.ATTR_PROCESS_FACTORY_ID.

Launch Termination Notification

The debug platform provides a mechanism for launch listeners to be notified when a launch terminates. A launch is a container of processes and debug targets. When all of the contained targets and processes terminate, a terminate notification is sent to those listeners implementing ILaunchesListener2.

Breakpoint Manager Enablement

The breakpoint manager defines the methods setEnabled(boolean) and isEnabled(). When the breakpoint manager is disabled, debuggers should ignore all registered breakpoints. The debug platform also provides a new listener mechanism, IBreakpointManagerListener which allows clients to register with the breakpoint manager to be notified when its enablement changes.

  • Class
    Description
    A debug event describes an event in a program being debugged or in a running process.
    A checked exception representing a failure.
    There is one instance of the debug plug-in available from DebugPlugin.getDefault().
    A stream listener is notified of changes to a binary stream monitor.
    A breakpoint listener is notified of breakpoint additions, removals, and changes.
    The breakpoint manager manages the collection of breakpoints in the workspace.
    A breakpoint manager listener is notified when the breakpoint manager's enablement changes.
    A breakpoints listener is notified of breakpoint additions, removals, and changes.
    An event filter allows clients to intercept debug events.
    A debug event set listener registers with the debug plug-in to receive event notification from programs being run or debugged.
    An expression listener is notified of expression additions, removals, and changes.
    The expression manager manages the collection of registered expressions in the workspace.
    An expression listener is notified of expression additions, removals, and changes.
    A launch is the result of launching a debug session and/or one or more system processes.
    A launch configuration describes how to launch an application.
    Notified when a launch configuration is created, deleted, or changed.
    Responsible for migrating launch configurations between different versions of Eclipse.
    Describes and creates instances of a specific type of launch configuration.
    An editable copy of a launch configuration.
    A launches listener is notified of launches as they are added and removed from the launch manager.
    Enhancements to the launches listener interface.
    A launch listener is notified of launches as they are added and removed from the launch manager.
    The launch manager manages the set of registered launches, maintaining a collection of active processes and debug targets.
    A launch mode.
    Provides logical structure types applicable to a raw implementation value from a debug model.
    Provides a value representing the logical structure of a raw implementation value from a debug model.
    A memory block listener is notified of the addition and removal of memory blocks with the memory block manager.
    Manages registered memory blocks in the workspace.
    A process factory is used to override default process (IProcess) creation by the debug plug-in, and can be contributed via plug-in XML.
    A prototype attributes label provider is contributed as an optional attribute of a launchConfigurationType extension and is responsible for displaying launch configurations prototype attributes of that type.
    Common base interface for an asynchronously processed request.
    A status handler registers to handle a specific status - error or otherwise.
    A stream listener is notified of changes to a stream monitor.
    A launch is the result of launching a debug session and/or one or more system processes.
    Utilities for launch configurations that persist, restore, and refresh collections of resources.