evaluateInFrame method
The evaluateInFrame
RPC is used to evaluate an expression in the context
of a particular stack frame. frameIndex
is the index of the desired
Frame, with an index of 0
indicating the top (most recent) frame.
If scope
is provided, it should be a map from identifiers to object ids.
These bindings will be added to the scope in which the expression is
evaluated, which is a child scope of the frame's current scope. This means
bindings provided in scope
may shadow instance members, class members,
top-level members, parameters and locals.
If disableBreakpoints
is provided and set to true, any breakpoints hit
as a result of this evaluation are ignored. Defaults to false if not
provided.
If idZoneId
is provided, temporary IDs for InstancesRef
and
Instances
in the RPC response will be allocated in the specified ID
zone. If idZoneId
is omitted, ID allocations will be performed in the
default ID zone for the isolate. See IDs and Names
for more information
about ID zones.
If the expression fails to parse and compile, then RPCError 113 "Expression compilation error" is returned.
If an error occurs while evaluating the expression, an ErrorRef reference will be returned.
If the expression is evaluated successfully, an InstanceRef reference will be returned.
If isolateId
refers to an isolate which has exited, then the Collected
Sentinel is returned.
The return value can be one of InstanceRef or ErrorRef.
This method will throw a SentinelException in the case a Sentinel is returned.
Implementation
Future<Response> evaluateInFrame(
String isolateId,
int frameIndex,
String expression, {
Map<String, String>? scope,
bool? disableBreakpoints,
String? idZoneId,
}) =>
_call('evaluateInFrame', {
'isolateId': isolateId,
'frameIndex': frameIndex,
'expression': expression,
if (scope != null) 'scope': scope,
if (disableBreakpoints != null)
'disableBreakpoints': disableBreakpoints,
if (idZoneId != null) 'idZoneId': idZoneId,
});