org.eclipse.wst.jsdt.chromium

## Interface Breakpoint

    public interface Breakpoint

A breakpoint in the browser JavaScript virtual machine. The `set*` method invocations will not take effect until `flush(org.eclipse.wst.jsdt.chromium.JavascriptVm.BreakpointCallback, org.eclipse.wst.jsdt.chromium.SyncCallback)` is called.

### Nested Class Summary

Nested Classes
`static class` `Breakpoint.Target` A reference to some JavaScript text that you can set breakpoints on.

### Field Summary

Fields
`static int` `EMPTY_VALUE` This value is used when the corresponding parameter is absent.
`static long` `INVALID_ID` A breakpoint has this ID if it does not reflect an actual breakpoint in a JavaScript VM debugger.

### Method Summary

All Methods Instance Methods Abstract Methods
`RelayOk` `clear(JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback)` Removes the breakpoint from the JS debugger and invokes the callback once the operation has finished.
`RelayOk` `flush(JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback)` Flushes the breakpoint parameter changes (set* methods) into the browser and invokes the callback once the operation has finished.
`java.lang.String` `getCondition()`
`long` `getId()`
`IgnoreCountBreakpointExtension` `getIgnoreCountBreakpointExtension()`
`long` `getLineNumber()` Returns line number of the breakpoint.
`Breakpoint.Target` `getTarget()`
`boolean` `isEnabled()`
`void` `setCondition(java.lang.String condition)` Sets the breakpoint condition as plain JavaScript (`null` to clear).
`void` `setEnabled(boolean enabled)` Sets whether this breakpoint is enabled.

### Field Detail

#### EMPTY_VALUE

    static final int EMPTY_VALUE

This value is used when the corresponding parameter is absent.

See Also:
  `JavascriptVm.setBreakpoint(org.eclipse.wst.jsdt.chromium.Breakpoint.Target, int, int, boolean, java.lang.String, org.eclipse.wst.jsdt.chromium.JavascriptVm.BreakpointCallback, org.eclipse.wst.jsdt.chromium.SyncCallback)`, Constant Field Values

#### INVALID_ID

    static final long INVALID_ID

A breakpoint has this ID if it does not reflect an actual breakpoint in a JavaScript VM debugger.

See Also:
  Constant Field Values

### Method Detail

#### getTarget

    Breakpoint.Target getTarget()

Returns:
  where this breakpoint was targeted to (e.g. script with a particular name or script with specified id)

#### getId

    long getId()

Returns:
  the breakpoint unique ID or `INVALID_ID` if breakpoint was deleted

#### getLineNumber

    long getLineNumber()

Returns line number of the breakpoint. As source is changed (typically with LiveEdit feature, and particularly by calling `UpdatableScript.setSourceOnRemote(java.lang.String, org.eclipse.wst.jsdt.chromium.UpdatableScript.UpdateCallback, org.eclipse.wst.jsdt.chromium.SyncCallback)`) this value may become stale. It gets updated when `JavascriptVm.listBreakpoints(org.eclipse.wst.jsdt.chromium.JavascriptVm.ListBreakpointsCallback, org.eclipse.wst.jsdt.chromium.SyncCallback)` asynchronous method completes.

Returns:
  1-based line number in script source

#### isEnabled

    boolean isEnabled()

Returns:
  whether this breakpoint is enabled

#### setEnabled

    void setEnabled(boolean enabled)

Sets whether this breakpoint is enabled. Requires subsequent `flush(org.eclipse.wst.jsdt.chromium.JavascriptVm.BreakpointCallback, org.eclipse.wst.jsdt.chromium.SyncCallback)` call.

Parameters:
  `enabled` - whether the breakpoint should be enabled

#### getCondition

    java.lang.String getCondition()

Returns:
  breakpoint condition as plain JavaScript or `null` if none

#### setCondition

    void setCondition(java.lang.String condition)

Sets the breakpoint condition as plain JavaScript (`null` to clear). Requires subsequent `flush(org.eclipse.wst.jsdt.chromium.JavascriptVm.BreakpointCallback, org.eclipse.wst.jsdt.chromium.SyncCallback)` call.

Parameters:
  `condition` - the new breakpoint condition

#### clear

    RelayOk clear(JavascriptVm.BreakpointCallback callback,
                  SyncCallback syncCallback)

Removes the breakpoint from the JS debugger and invokes the callback once the operation has finished. This operation does not require a `flush` invocation.

Parameters:
  `callback` - to invoke once the operation result is available

#### flush

    RelayOk flush(JavascriptVm.BreakpointCallback callback,
                  SyncCallback syncCallback)

Flushes the breakpoint parameter changes (set* methods) into the browser and invokes the callback once the operation has finished. This method must be called for the set* method invocations to take effect.

Parameters:
  `callback` - to invoke once the operation result is available

#### getIgnoreCountBreakpointExtension

    IgnoreCountBreakpointExtension getIgnoreCountBreakpointExtension()

Returns:
  extension that supports ignore count property of breakpoint, same instance that `JavascriptVm.getBreakpointTypeExtension()` returns