org.eclipse.wst.jsdt.debug.core.breakpoints

## Interface IJavaScriptBreakpoint

All Known Subinterfaces:
  IJavaScriptFunctionBreakpoint, IJavaScriptLineBreakpoint, IJavaScriptLoadBreakpoint

    public interface IJavaScriptBreakpoint

General JavaScript breakpoint

Since:
  1.0

### Field Summary

Fields
`static java.lang.String` `ELEMENT_HANDLE` JSDT member handle
`static java.lang.String` `HIT_COUNT` The hit count set in the breakpoint
`static java.lang.String` `MARKER_ID` The id of the root breakpoint marker type for JavaScript breakpoints Value is: `org.eclipse.wst.jsdt.debug.core.breakpoint.marker`
`static java.lang.String` `SCRIPT_PATH` Breakpoint attribute for the path of the script
`static java.lang.String` `SUSPEND_POLICY` The suspend policy for the breakpoint
`static int` `SUSPEND_TARGET` Suspend policy for suspending the current target
`static int` `SUSPEND_THREAD` Suspend policy for suspending the current thread of execution
`static java.lang.String` `TYPE_NAME` The type name within the script

### Method Summary

All Methods Instance Methods Abstract Methods
`int` `getHitCount()` Returns the hit count set for this breakpoint or -1 if no hit count has been set.
`java.lang.String` `getJavaScriptElementHandle()` Returns the `IJavaScriptElement` handle for the member this breakpoint is set on.
`java.lang.String` `getScriptPath()` Returns the path of the script as it was set when the breakpoint was created.
`int` `getSuspendPolicy()` Returns the suspend policy for this breakpoint, default suspend policy is to suspend the thread
`java.lang.String` `getTypeName()` Returns the type name that the breakpoint is set within.
`boolean` `isInstalled()` Returns if the breakpoint is currently installed or not.
`void` `setHitCount(int count)` Sets the given hit count for the breakpoint, throws an `IllegalArgumentException` if the given count is less than 1.
`void` `setJavaScriptElementHandle(java.lang.String handle)` Allows the `IJavaScriptElement` handle to be set for this breakpoint.
`void` `setSuspendPolicy(int policy)` Sets the suspend policy for this breakpoint.

### Field Detail

#### MARKER_ID

    static final java.lang.String MARKER_ID

The id of the root breakpoint marker type for JavaScript breakpoints
Value is: `org.eclipse.wst.jsdt.debug.core.breakpoint.marker`

Since:
  1.1
See Also:
  Constant Field Values

#### SUSPEND_POLICY

    static final java.lang.String SUSPEND_POLICY

The suspend policy for the breakpoint

See Also:
  Constant Field Values

#### TYPE_NAME

    static final java.lang.String TYPE_NAME

The type name within the script

See Also:
  Constant Field Values

#### SCRIPT_PATH

    static final java.lang.String SCRIPT_PATH

Breakpoint attribute for the path of the script

See Also:
  Constant Field Values

#### HIT_COUNT

    static final java.lang.String HIT_COUNT

The hit count set in the breakpoint

See Also:
  Constant Field Values

#### SUSPEND_THREAD

    static final int SUSPEND_THREAD

Suspend policy for suspending the current thread of execution

See Also:
  Constant Field Values

#### SUSPEND_TARGET

    static final int SUSPEND_TARGET

Suspend policy for suspending the current target

See Also:
  Constant Field Values

#### ELEMENT_HANDLE

    static final java.lang.String ELEMENT_HANDLE

JSDT member handle

See Also:
  Constant Field Values

### Method Detail

#### getScriptPath

    java.lang.String getScriptPath()
                            throws CoreException

Returns the path of the script as it was set when the breakpoint was created.
This method cannot return `null`

Returns:
  the path of the script this breakpoint was created on never `null`
Throws:
  `CoreException` - if the breakpoint cannot be accessed

#### getTypeName

    java.lang.String getTypeName()
                          throws CoreException

Returns the type name that the breakpoint is set within.
This method can return `null` when the breakpoint is set on a top-level type i.e. set on the root source

Returns:
  the type name or `null`
Throws:
  `CoreException` - if the breakpoint cannot be accessed

#### getHitCount

    int getHitCount()
             throws CoreException

Returns the hit count set for this breakpoint or -1 if no hit count has been set.

Returns:
  the hit count
Throws:
  `CoreException` - if the breakpoint cannot be accessed

#### setHitCount

    void setHitCount(int count)
              throws CoreException,
                     java.lang.IllegalArgumentException

Sets the given hit count for the breakpoint, throws an `IllegalArgumentException` if the given count is less than 1.

Parameters:
  `count` - the count to set, must be > 0
Throws:
  `CoreException`
  `java.lang.IllegalArgumentException` - if count < 1

#### getSuspendPolicy

    int getSuspendPolicy()
                  throws CoreException

Returns the suspend policy for this breakpoint, default suspend policy is to suspend the thread

Returns:
  the suspend policy
Throws:
  `CoreException` - if the breakpoint cannot be accessed
See Also:
  `SUSPEND_THREAD`, `SUSPEND_TARGET`

#### setSuspendPolicy

    void setSuspendPolicy(int policy)
                   throws CoreException

Sets the suspend policy for this breakpoint. Anything other than `SUSPEND_THREAD` or `SUSPEND_TARGET` will be ignored.

Parameters:
  `policy` - the policy to set
Throws:
  `CoreException` - if the breakpoint cannot be accessed
See Also:
  `SUSPEND_THREAD`, `SUSPEND_TARGET`

#### getJavaScriptElementHandle

    java.lang.String getJavaScriptElementHandle()
                                         throws CoreException

Returns the `IJavaScriptElement` handle for the member this breakpoint is set on.
This method can return `null` if no element handle has been set

Returns:
  the `IJavaScriptElement` handle or `null`
Throws:
  `CoreException` - if the breakpoint cannot be accessed

#### setJavaScriptElementHandle

    void setJavaScriptElementHandle(java.lang.String handle)
                             throws CoreException

Allows the `IJavaScriptElement` handle to be set for this breakpoint.

Parameters:
  `handle` - the new handle to set, `null` will remove any existing handle
Throws:
  `CoreException` - if the breakpoint cannot be accessed

#### isInstalled

    boolean isInstalled()
                 throws CoreException

Returns if the breakpoint is currently installed or not.

Returns:
  `true` if the breakpoint is installed `false` otherwise
Throws:
  `CoreException` - if the breakpoint cannot be accessed