Overview

# Introduction

This document lists changes made to the Debugger JPDA 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

- Debugger JPDA API

# 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.

- (Aug 12 '05) JPDA API interfaces that correspond to JDI API declared as not to implement.
- (Jun 29 '05) JPDAStep class added (also new method createJPDAStep added to JPDADebugger)
- (Oct 18 '04) "global" parameter added to "SourcePathProvider.getURL (String relativePath, boolean global)" method.
- (Oct 13 '04) "EditorContext.updateTimeStamp(timeStamp,url)" method has been added.
- (Oct 8 '04) "String EditorContext.getClassName (url, lineNumber)" method has been added.
- (Jun 8 '04) ContextProvider and EngineContextProvider has been changed from interfaces to abstract classes.
- (May 25 '04) Firing of exceptions during watches evaluation fixed.
- (May 11 '04) JPDABreakpointEvent improvements.
- (May 10 '04) Definition of various breakpoints has been generalized.

# All changes by date

- (Nov 3 '05) Added canBeModified() method to JPDADebugger class
- (Aug 18 '05) Added interrupt method to JPDAThread class
- (Aug 12 '05) JPDA API interfaces that correspond to JDI API declared as not to implement.
- (Jun 29 '05) JPDAStep class added (also new method createJPDAStep added to JPDADebugger)
- (Feb 15 '05) LineBreakpoint supplied with the information about the source path where it is set.
- (Oct 18 '04) "global" parameter added to "SourcePathProvider.getURL (String relativePath, boolean global)" method.
- (Oct 13 '04) "EditorContext.updateTimeStamp(timeStamp,url)" method has been added.
- (Oct 8 '04) "String EditorContext.getClassName (url, lineNumber)" method has been added.
- (Jun 8 '04) Two methods added to ContextProvider.
- (Jun 8 '04) ContextProvider and EngineContextProvider has been changed from interfaces to abstract classes.
- (Jun 1 '04) InvalidExpressionException can encapsulate other exceptions.
- (Jun 1 '04) ContextProvider.getFieldLineNumber() method added.
- (May 25 '04) Firing of exceptions during watches evaluation fixed.
- (May 17 '04) JPDADebugger.SESSION_ID.
- (May 16 '04) Improvements of SmartStepping implementation.
- (May 11 '04) JPDABreakpointEvent improvements.
- (May 10 '04) Definition of various breakpoints has been generalized.
- (May 9 '04) Support methods for various new features added.
- (May 4 '04) Breakpoint Listener added.
- (May 3 '04) Support for synchronouous start of JPDADebugger added.
- (Apr 20 '04) JPDADebugger.getException() method added.

# 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.jpda/1 > 1.20

- (2.3) Added canBeModified() method to JPDADebugger class
- (2.1) Added interrupt method to JPDAThread class
- (2.0) JPDA API interfaces that correspond to JDI API declared as not to implement.
- (1.5) JPDAStep class added (also new method createJPDAStep added to JPDADebugger)
- (1.3) LineBreakpoint supplied with the information about the source path where it is set.

# Changes by affected class

## `org.netbeans.api.debugger.jpda.JPDADebugger`

- (Nov 3 '05) Added canBeModified() method to JPDADebugger class

## `org.netbeans.api.debugger.jpda.JPDAThread`

- (Aug 18 '05) Added interrupt method to JPDAThread class

## `org.netbeans.api.debugger.jpda.LineBreakpoint`

- (Feb 15 '05) LineBreakpoint supplied with the information about the source path where it is set.

# Details of all changes by API and date

## Debugger JPDA API

### Added canBeModified() method to JPDADebugger class

Nov 3 '05; API spec. version: 2.3; affected top-level classes: `JPDADebugger`; made by: mentlicher; issues: #67046

A possibility to detect whether the debuggee is read-only is added. This check works fine on JDK 1.5 and higher, on JDK 1.4 it returns `true` by default.

### Added interrupt method to JPDAThread class

Aug 18 '05; API spec. version: 2.1; affected top-level classes: `JPDAThread`; made by: mentlicher; issues: #59072

A possibility to interrupt a debuggee thread is added.

### JPDA API interfaces that correspond to JDI API declared as not to implement.

Aug 12 '05; API spec. version: 2.0; made by: mentlicher

JPDA API represents JDI functionality. Since JDI interfaces evolve from one version to another, it's necessary to declare that interfaces in org.netbeans.api.debugger.jpda package should not be implemented, since new methods can be added to these interfaces at any time to keep up with the JDI functionality.

Also JPDABreakpointEvent and JPDABreakpointListener are moved to newly created org.netbeans.api.debugger.jpda.event package.

### JPDAStep class added (also new method createJPDAStep added to JPDADebugger)

Jun 29 '05; API spec. version: 1.5; made by: rondruska

JPDAStep allows to create a step request to JDI with no UI interference. It was designed for new RunIntoMethod action. New method JPDADebugger.createJPDAStep creates a new instance of JPDAStep.

Binary-compatible

### LineBreakpoint supplied with the information about the source path where it is set.

Feb 15 '05; API spec. version: 1.3; affected top-level classes: `LineBreakpoint`; made by: lkotouc

A line breakpoint does not contain the information about the source path where it is set. There is no way how to differ between breakpoints in the case when - several JSPs have the same name AND - these JSPs are statically included into one JSP page.

### "global" parameter added to "SourcePathProvider.getURL (String relativePath, boolean global)" method.

Oct 18 '04; made by: jjancura

This parameter has been added to distinguish between finding sources for smart stepping feature, and for all other features like douuble click on stack trace..

### "EditorContext.updateTimeStamp(timeStamp,url)" method has been added.

Oct 13 '04; made by: jjancura

This method is needed to correctly implement fix & continue action.

### "String EditorContext.getClassName (url, lineNumber)" method has been added.

Oct 8 '04; made by: jjancura

This method is needed to correctly implement line breakpoint in secondary classes.

### Two methods added to ContextProvider.

Jun 8 '04; made by: jjancura

ContextProvider.getImports () method added to support better evaluation of expressions. ContextProvider.getLineNumber (annotaion) method added to fix stepping through modified files.

### ContextProvider and EngineContextProvider has been changed from interfaces to abstract classes.

Jun 8 '04; made by: jjancura

ContextProvider and EngineContextProvider has been changed from interfaces to abstract classes. This was done to support future changes in these classes.

### InvalidExpressionException can encapsulate other exceptions.

Jun 1 '04; made by: jjancura

Mew constructor added (InvalidExpressionException(java.lang.Throwable)), and InvalidExpressionException.getTargetException() method added to support firing of nested exceptions.

- JPDAWatch.getToStringValue()
- ObjectVariable.getToStringValue()
- ObjectVariable.invokeMethod()

### ContextProvider.getFieldLineNumber() method added.

Jun 1 '04; made by: jjancura

ContextProvider.getFieldLineNumber() method added.

### Firing of exceptions during watches evaluation fixed.

May 25 '04; made by: jjancura

InvalidExpressionException is fired from folowing methods now:

- JPDAWatch.getToStringValue()
- ObjectVariable.getToStringValue()
- ObjectVariable.invokeMethod()

### JPDADebugger.SESSION_ID.

May 17 '04; made by: jjancura

JPDADebugger.SESSION_ID constant has been added.

### Improvements of SmartStepping implementation.

May 16 '04; made by: jjancura

We have added several new methods to fix issues in smart stepping implementation:

- PropertyChangeListener added to SmartSteppingFilter.
- JPDADebugger.getSmartSteppingFilter ()
- SmartSteppingFilter.getExclusionPatterns ()
- PropertyChangeListener added to EngineContextProvider.
- EngineContextProvider.getOriginalSourceRoots()
- EngineContextProvider.getSourceRoots()
- EngineContextProvider.setSourceRoots()

### JPDABreakpointEvent improvements.

May 11 '04; made by: jjancura

We have added several new properties to JPDABreakpointEvent:

- ReferenceType
- resume
- Thread
- Variable

### Definition of various breakpoints has been generalized.

May 10 '04; made by: jjancura

We have changed ClassLoadUnloadBreakpoint to support class exclusion filters, and more than one class filter. The same change was done for MethodBreakpoints too.

### Support methods for various new features added.

May 9 '04; made by: jjancura

Support for Fix Action improved. Support for Pop Frame action added. Support for static and inherited fields added. New methods:

- CallStackFrame.isObsolete ()
- CallStackFrame.popFrame ()
- JPDADebugger.canFixClasses ()
- JPDADebugger.fixClasses(java.util.Map)
- ObjectVariable.getAllStaticFields(int,int)
- ObjectVariable.getInheritedFields(int,int)

### Breakpoint Listener added.

May 4 '04; made by: jjancura

JPDABreakpointEvent and JPDABreakpointListener classes added. JPDABreakpoint.addJPDABreakpointListener (...) and JPDABreakpoint.removeJPDABreakpointListener (...) methods added.

### Support for synchronouous start of JPDADebugger added.

May 3 '04; made by: jjancura

Methods starting debugger has been modified to support synchronous start of debugging.

### JPDADebugger.getException() method added.

Apr 20 '04; made by: jjancura
JPDADebugger.getException() method added to. This is support for notifications about problems during start of debugger.

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.