addBreakpointWithScriptUri method Null safety

  1. @override
Future<Breakpoint> addBreakpointWithScriptUri(
  1. String isolateId,
  2. String scriptUri,
  3. int line,
  4. {int? column}

The addBreakpoint RPC is used to add a breakpoint at a specific line of some script. This RPC is useful when a script has not yet been assigned an id, for example, if a script is in a deferred library which has not yet been loaded.

The scriptUri 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.


Future<Breakpoint> addBreakpointWithScriptUri(
  String isolateId,
  String scriptUri,
  int line, {
  int? column,
}) =>
    _call('addBreakpointWithScriptUri', {
      'isolateId': isolateId,
      'scriptUri': scriptUri,
      'line': line,
      if (column != null) 'column': column,