Package com.oracle.truffle.api.debug
Class Breakpoint.Builder
java.lang.Object
com.oracle.truffle.api.debug.Breakpoint.Builder
- Enclosing class:
Breakpoint
Builder implementation for a new
breakpoint
.- Since:
- 0.17
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
columnIs
(int column) Specifies the breakpoint's column number.ignoreCount
(int ignoreCount) Specifies the number of times a breakpoint is ignored until it hits (i.e.lineIs
(int line) Specifies the breakpoint's line number.oneShot()
Specifies that the breakpoint will disable itself after suspending execution, i.e.resolveListener
(Breakpoint.ResolveListener resolveListener) Set a resolve listener.rootInstance
(DebugValue rootInstance) Specifies the breakpoint's root instance.sourceElements
(SourceElement... sourceElements) Specifies which source elements will this breakpoint adhere to.suspendAnchor
(SuspendAnchor anchor) Specify the breakpoint suspension anchor within the guest language source location.
-
Method Details
-
lineIs
Specifies the breakpoint's line number. Can only be invoked once per builder. Cannot be used together withBreakpoint.newBuilder(SourceSection)
.- Parameters:
line
- 1-based line number- Throws:
IllegalStateException
- ifline < 1
- Since:
- 0.17
-
suspendAnchor
Specify the breakpoint suspension anchor within the guest language source location. By default, the breakpoint suspendsbefore
the source location.- Parameters:
anchor
- the breakpoint suspension anchor- Since:
- 0.32
-
columnIs
Specifies the breakpoint's column number. Can only be invoked once per builder. Cannot be used together withBreakpoint.newBuilder(SourceSection)
. A line needs to be specified before a column can be set.- Parameters:
column
- 1-based column number- Throws:
IllegalStateException
- ifcolumn < 1
- Since:
- 0.33
-
resolveListener
Set a resolve listener. The listener is called when the breakpoint is resolved at the target location. A breakpoint is not resolved till the target source section is loaded. The target resolved location may differ from the specifiedline
andcolumn
.- Since:
- 0.33
-
ignoreCount
Specifies the number of times a breakpoint is ignored until it hits (i.e. suspends execution}.- Since:
- 0.17
- See Also:
-
oneShot
Specifies that the breakpoint will disable itself after suspending execution, i.e. on first hit.Disabled one-shot breakpoints can be re-enabled.
- Since:
- 0.17
-
sourceElements
Specifies which source elements will this breakpoint adhere to. When not specified, breakpoint adhere toSourceElement.STATEMENT
elements. Can only be invoked once per builder.- Parameters:
sourceElements
- a non-empty list of source elements- Since:
- 0.33
-
rootInstance
Specifies the breakpoint's root instance. The breakpoint will be hit only when theDebugScope.getRootInstance()
matches to the provided one.- Parameters:
rootInstance
- value of the root instance in which the breakpoint is to be hit.- Since:
- 19.3.0
-
build
- Returns:
- a new breakpoint instance of
SOURCE_LOCATION
kind. - Since:
- 0.17
-