addBreakpoint method Null safety
The addBreakpoint
RPC is used to add a breakpoint at a specific line of
some script.
The scriptId
parameter is used to specify the target script.
The line
parameter is used to specify the target line for the
breakpoint. If there are multiple possible breakpoints on the target line,
then the VM will place the breakpoint at the location which would execute
soonest. If it is not possible to set a breakpoint at the target line, the
breakpoint will be added at the next possible breakpoint location within
the same function.
The column
parameter may be optionally specified. This is useful for
targeting a specific breakpoint on a line with multiple possible
breakpoints.
If no breakpoint is possible at that line, the 102
(Cannot add
breakpoint) RPC error
code is returned.
Note that breakpoints are added and removed on a per-isolate basis.
If isolateId
refers to an isolate which has exited, then the Collected
Sentinel is returned.
See Breakpoint
.
This method will throw a SentinelException in the case a Sentinel is returned.
Implementation
Future<Breakpoint> addBreakpoint(
String isolateId,
String scriptId,
int line, {
int? column,
});