Skip navigation links

Introduction

This document lists changes made to the Debugger Core APIs. Please ask on the nbdev@netbeans.org mailing list if you have any questions about the details of a change, or are wondering how to convert existing code to be compatible.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:

OpenIDE-Module-Module-Dependencies: org.netbeans.api.debugger/1 > 1.20

Changes by affected class

org.netbeans.api.debugger.ActionsManager

org.netbeans.spi.debugger.ActionsProvider

org.netbeans.api.debugger.ActiveBreakpoints

org.netbeans.api.debugger.Breakpoint

org.netbeans.spi.debugger.BreakpointsActivationProvider

org.netbeans.spi.debugger.ContextAwareService

org.netbeans.spi.debugger.ContextAwareSupport

org.netbeans.api.debugger.DebuggerEngine

org.netbeans.api.debugger.DebuggerInfo

org.netbeans.api.debugger.DebuggerManager

org.netbeans.spi.debugger.DebuggerServiceRegistration

org.netbeans.spi.debugger.DebuggerServiceRegistrations

org.netbeans.api.debugger.Properties

org.netbeans.api.debugger.Session

org.netbeans.api.debugger.SessionBridge

org.netbeans.api.debugger.Watch


Details of all changes by API and date


Debugger Core API

API for pinned Watches

Apr 18 '16; API spec. version: 1.54; affected top-level classes: DebuggerManager Watch; made by: mentlicher; issues: #258651
A Watch.Pin base interface introduced as a basis for specific platform-dependent and location-dependent implementations. DebuggerManager.createPinnedwatch() introduced.

A mechanism for activation/deactivation of engine-related breakpoints.

Apr 30 '15; API spec. version: 1.51; affected top-level classes: ActiveBreakpoints BreakpointsActivationProvider; made by: mentlicher; issues: #242800
API class ActiveBreakpoints and SPI interface BreakpointsActivationProvider introduced. These classes handle an activation/deactivation of engine-related breakpoints, which is independent on their enabled/disabled state.

A session bridge introduced to handle mixed languages debugging.

Sep 8 '14; API spec. version: 1.48; affected top-level classes: SessionBridge; made by: mentlicher; issues: #246819
SessionBridge class introduced. This class allows to suggest that some debug action can be handled by a different debugging session. The handlers can be registered via implementations of SessionChanger interface.

API for changing enabled state of a Watch

Mar 27 '12; API spec. version: 1.36; affected top-level classes: Watch; made by: mentlicher; issues: #209783
Two method are added to Watch class: isEnabled() and setEnabled(boolean). When the enabled state changes, PROP_ENABLED event is fired.

Added a possibility to enable/disable other breakpoints when one is hit.

Dec 19 '11; API spec. version: 1.35; affected top-level classes: Breakpoint; made by: mentlicher; issues: #197707
Four methods are added to the Breakpoint class, that allow to get or set a set of breakpoints, that are enabled or disabled when the breakpoint is hit. One test method is provided, which determines if the dependent breakpoints are supported by the implementation.

Added methods:
Breakpoint.canHaveDependentBreakpoints(), Breakpoint.getBreakpointsToEnable(), Breakpoint.setBreakpointsToEnable(), Breakpoint.getBreakpointsToDisable(), Breakpoint.setBreakpointsToDisable().

Evaluate action is made generic, based on action providers.

Nov 12 '10; API spec. version: 1.29; affected top-level classes: ActionsManager; made by: mentlicher; issues: #191394

Evaluate action is moved from JPDA Debugger into Debugger Core UI module. ActionsManager.ACTION_EVALUATE constant was added for use by debugger-specific provider (ActionsProvider) of Evaluate action.

Allow multiple debugger service registrations and position order

Sep 10 '10; API spec. version: 1.28; affected top-level classes: DebuggerServiceRegistration DebuggerServiceRegistrations ActionsProvider; made by: mentlicher; issues: #190080

Allow to specify the order of the debugger service registry. For the need of being able to define multiple different registrations for a single instance, @DebuggerServiceRegistrations and ActionsProvider.Registrations annotations are introduced.

Breakpoints group properties.

Feb 28 '10; API spec. version: 1.25; affected top-level classes: Breakpoint; made by: mentlicher; issues: #179759

Add Breakpoint.getGroupProperties() method, that returns an implementation of GroupProperties class with the relevant grouping information used by BreakpointsWindow to create hierarchy of breakpoint groups

It's possible to override New Watch action with a session-specific provider.

Feb 23 '10; API spec. version: 1.24; affected top-level classes: ActionsManager; made by: mentlicher; issues: #180558

ActionsManager.ACTION_NEW_WATCH constant was added for use by session-specific provider of New Watch action. That action invokes an implementation of ActionsProvider that is registered for the active debugger session and contains ActionsManager.ACTION_NEW_WATCH action.

A declarative mechanism to delay creation of action provider instance until a file with specific MIME type becomes active.

Feb 11 '10; API spec. version: 1.23; affected top-level classes: ActionsProvider; made by: mentlicher; issues: #177561

ActionsProvider.Registration annotation is enhanced with two additional methods actions() and activateForMIMETypes(). Until a file with the listed MIME type is selected in the IDE, the appropriate actions provider is left disabled for the given list of actions, without instantiating the implementation class.

Support for changing the order of watches.

Dec 15 '09; API spec. version: 1.22; affected top-level classes: DebuggerManager; made by: mentlicher; issues: #178301

createWatch(int index, String expr) and reorderWatches(int[] permutation) methods added to DebuggerManager class.
These methods are going to be called from WatchesTreeModel when watches are reordered.

Support for providing initial values of properties.

Feb 28 '09; API spec. version: 1.17; affected top-level classes: Properties; made by: mentlicher; issues: #158775

Properties.Initializer interface introduced to provide initial values of properties. This is necessary when properties are accessed from more places and it's not practical to copy default values to every such location.

Support for listening to changes of property values.

Feb 28 '09; API spec. version: 1.17; affected top-level classes: Properties; made by: mentlicher; issues: #158907

addPropertyChangeListener() and removePropertyChangeListener() methods added to Properties class.

Lookup improvements and service annotation registration.

Feb 2 '09; API spec. version: 1.16; affected top-level classes: DebuggerServiceRegistration ContextAwareService ContextAwareSupport; made by: mentlicher; issues: #153093 #156687

In order to be able to register debugger services on System FileSystem, which brings more flexibility and better performance (see also ), we add non-recursive content of org.openide.util.Lookups.forPath() into debugger lookup. Since debugger needs retrieve context-aware services from the lookup, ContextAwareService interface is introduced.

Annotations are added for easy registration on module layers. DebuggerServiceRegistration to register implementations of interfaces, *Provider.Registration to register implementations of appropriate providers.

Use of some generic types in API; ContextProvider implemented more broadly; DebuggerManager.join

Mar 1 '08; API spec. version: 1.13; affected top-level classes: DebuggerEngine DebuggerInfo DebuggerManager Session; made by: jglick; issues: #128229

ContextProvider is now properly generified, and implemented also by:

The new method DebuggerManager.join can be used to merge lookup lists easily.


Compatibility:

As with any generification, it is possible for old code to no longer compile. E.g.

List<X> = lookup.lookup(folder, X.class);

must be changed to:

List<? extends X> = lookup.lookup(folder, X.class);

Binary-compatible

Add filter for hit counts to breakpoints.

May 21 '07; API spec. version: 1.11; made by: mentlicher

To be able to set breakpoint for number of iterations, we need to add a filter for hit counts into Breakpoint API.

Added methods:
Breakpoint.getHitCountFilter(), Breakpoint.getHitCountFilteringStyle(), Breakpoint.setHitCountFilter().

Added fields:
Breakpoint.PROP_HIT_COUNT_FILTER, Breakpoint.HIT_COUNT_FILTERING_STYLE.

Support for breakpoint validity.

Feb 21 '07; API spec. version: 1.10; made by: mentlicher

Added fields: Breakpoint.PROP_VALIDITY - This constant is used in property change events as a notification about change in validity.
Breakpoint.VALIDITY - enumeration of constants for breakpoint validity.

Added methods: Breakpoint.getValidity(), Breakpoint.getValidityMessage(), Breakpoint.setValidity() - validity management.

Support for stepping over operations.

Feb 1 '07; API spec. version: 1.9; made by: mentlicher

Added fields: ActionsManager.ACTION_STEP_OPERATION, This constant is used in action performer which implements an operation step.

Debugger actions can be posted asynchronously.

Aug 24 '05; API spec. version: 1.5; made by: mentlicher

Added methods: ActionsManager.postAction(Object), ActionsProvider.postAction(Object, Runnable), These can be used to call and implement asynchronous actions.

final modifier removed from ActionsProviderSupport.isEnabled.

Nov 23 '04; API spec. version: 1.3; made by: jjancura

Having final modifier for this method can be too obstructive in some cases. I had a problem writing tests.

Support for Breakpoints Group added.

May 13 '04; made by: jjancura

Breakpoint.getGroupName (), Breakpoint.setGroupName () methods were added. Breakpoint.PROP_GROUP_NAME has been added.

Support for ToggleBreakpointAction added, and some bugfix of Debugger Actions support API.

May 9 '04; made by: jjancura

ActionsManager.doAction (...), ActionsProvider.doAction (...) and ActionsManagerListener.actionPefrormed (...) methods will not return boolean any longer. This parameter was unusefull and it was not posible to implement it in some meaningful way.

Support for synchronouous start of DebuggerEngines added.

May 3 '04; made by: jjancura

void DebuggerManager.startDebugging (DebuggerInfo) has been changed to DebuggerEngine[] DebuggerManager.startDebugging (DebuggerInfo). So it returns array of all DebuggerEngines created for given DebuggerInfo.

Support for "dual" actions added.

Apr 29 '04; made by: jjancura
According to Debugger UI Specification there are some actions that have two different meanings. for example Step Into action. When some Java Debugger session is running it steps into the current method. But if there is no session running it should start a new session for Main Project and stop in its main method. Thats why we have to update support for debugger actions. Changes made: