Record Replay Protocol

Methods

Pause.callFunction

Call a function object. This command is effectful.

parameters
object
ObjectId

Function or other object to call.

thisValue
Value

this value to use for the call.

argumentValues
array[ Value ]

Arguments to use for the call.

Return Object
result
Result

Result of the call.

Pause.callObjectProperty

Read a property from an object, then call the result. This command is effectful.

parameters
object
ObjectId

Object to perform the call on.

name
string

Property to call.

argumentValues
array[ Value ]

Arguments to use for the call.

Return Object
result
Result

Result of the call.

Pause.evaluateInFrame

Evaluate an expression in the context of a call frame. This command is effectful.

parameters
frameId
FrameId

Frame to perform the evaluation in.

expression
string

Expression to evaluate.

pure
boolean

Execute the expression without side-effects. Usage of this parameter will result in an error response if the target has not opted in to the 'pureEval' capability. If a target has not opted in, it may assume that this parameter will always be false.

useOriginalScopes
boolean

Whether to perform the evaluation in the context of the original scope chain for the frame.

Return Object
result
Result

Result of the evaluation.

Pause.evaluateInGlobal

Evaluate an expression in a global context. This command is effectful.

parameters
expression
string

Expression to evaluate.

pure
boolean

Execute the expression without side-effects. Usage of this parameter will result in an error response if the target has not opted in to the 'pureEval' capability. If a target has not opted in, it may assume that this parameter will always be false.

Return Object
result
Result

Result of the evaluation.

Pause.getAllFrames

Get all frames on the stack.

Return Object
frames
CallStack

IDs of all frames on the stack.

data
PauseData

Any data associated with the frames.

Pause.getExceptionValue

Get any exception that is being thrown at this point.

Return Object
exception
Value

If an exception is being thrown, the exception's value.

data
PauseData

Any additional data associated with the exception.

Pause.getFrameArguments

Get the values of a frame's arguments.

parameters
frameId
FrameId

Frame to get the parameters for.

Return Object
argumentValues
array[ Value ]

Current values of each of the frame's arguments. Omitted for non-call frames.

data
PauseData

Any data associated with the argument values.

Pause.getFrameSteps

Get the points of all steps that are executed by a frame.

If this is a generator frame then steps from all places where the frame executed will be returned, except in parts of the recording are unloaded (see Session.listenForLoadChanges).

parameters
frameId
FrameId

Frame to get steps for.

Return Object
steps
array[ Debugger.PointDescription ]

Execution points for all steps which the frame executes.

Pause.getObjectPreview

Load a preview for an object.

parameters
object
ObjectId

Object to load the preview for.

level
ObjectPreviewLevel

Amount of data desired in the resulting preview. If omitted, the full non-overflowing preview for the object will be returned.

Return Object
data
PauseData

Returned data. This includes a preview for the object, and additional data for objects which it references.

Pause.getObjectPreviews

Load previews for multiple objects.

parameters
objects
array[ ObjectId ]

Objects to load previews for. A maximum of 500 objects are supported.

level
ObjectPreviewLevel

Amount of data desired in the resulting previews. If omitted, the full non-overflowing preview for each object will be returned.

Return Object
data
PauseData

Returned data. This includes a preview for each object requested, and additional data for referenced objects.

Pause.getObjectProperty

Read a property from an object. This command is effectful.

parameters
object
ObjectId

Object to get the property from.

name
string

Property to get.

Return Object
result
Result

Result of getting the property.

Pause.getScope

Load a scope's contents.

parameters
scope
ScopeId

Scope to load.

Return Object
data
PauseData

Returned data. This includes the scope's contents, and additional data for objects which it references.

Pause.getTopFrame

Get the topmost frame on the stack.

Return Object
frame
FrameId

ID of the topmost frame, if there is one.

data
PauseData

Any data associated with the frame.

Types

Pause.CallStack

Description of the entire call stack: the IDs of all frames, in order starting with the topmost (currently executing) frame.

Type: array

Pause.ContainerEntry

An entry in a container object (maps, sets, weak maps, and weak sets).

Type: object

properties
key
Value

For maps and weak maps, this entry's key.

value
Value

This entry's value.

Pause.Frame

Description of a stack frame.

Type: object

properties
frameId
FrameId

ID of this frame.

type
FrameType

Type of frame which is executing.

functionName
string

For call frames, the name of the function being called. Omitted if the function has no name.

originalFunctionName
string

For call frames, the original name of the function being called. Omitted if the function has no name.

functionLocation
Debugger.MappedLocation

For call frames, the location of the function being called.

location
Debugger.MappedLocation

Location in the source where this frame is paused at.

scopeChain
array[ ScopeId ]

Scope chain for the call frame, from innermost to outermost.

originalScopeChain
array[ ScopeId ]

Alternate scope chain determined from any source map for the frame's generated source. This can be structured differently and include different names than the normal scope chain.

this
Value

this value of the call frame.

returnValue
Value

Return value of the frame, if this is the topmost frame and execution is paused at a return site.

Pause.FrameId

Identifier for a call frame in a pause.

Type: string

Pause.FrameType

Different kinds of stack frames.

Allowed Values: call, global, module, eval

Type: string

Pause.NamedValue

Description of a value, with an associated name.

Type: Value

properties
name
string

Pause.Object

Description of an object.

Type: object

properties
objectId
ObjectId

ID of this object.

className
string

Object class name.

preview
ObjectPreview

Any preview data available for the object's contents.

persistentId
Debugger.PersistentObjectId

Any persistent ID for this object.

Pause.ObjectId

Identifier for a JS object in a pause.

Type: string

Pause.ObjectPreview

Description of some or all of an object's contents.

Type: object

properties
overflow
boolean

Set if there are additional contents not in this preview which can be obtained by getting a "full" preview.

prototypeId
ObjectId

ID of the prototype, if there is one.

properties
array[ Property ]

Descriptors of the object's own properties.

containerEntries
array[ ContainerEntry ]

Entries of container objects.

getterValues
array[ NamedValue ]

Results of evaluating getter properties from this or the prototype chain on this object, if they could be evaluated without side effects.

containerEntryCount
integer

For container objects, the number of entries in the container.

regexpString
string

For RegExp objects, the string representation.

dateTime
integer

For Date objects, the result of calling getTime().

proxyState
ProxyStateData

For Proxy objects, the target and handler.

promiseState
PromiseStateData

For Promise objects, the resolution state.

functionName
string

For Function objects, the name of the function. Omitted for functions with no name.

functionParameterNames
array[ string ]

For Function objects, the names of the parameters.

functionLocation
Debugger.MappedLocation

For Function objects, any associated source location.

node
DOM.Node

For DOM Node objects, information about the node.

rule
CSS.Rule

For CSSRule objects, information about the rule.

style
CSS.StyleDeclaration

For CSSStyleDeclaration objects, information about the style.

styleSheet
CSS.StyleSheet

For StyleSheet objects, information about the style sheet.

Pause.ObjectPreviewLevel

Levels of detail for an object preview.

none: Don't actually generate a preview, but just an Object with non-preview information.
noProperties: Generate an overflowing preview with no properties.
canOverflow: Generate a preview with some properties. If there are too many properties, some may be omitted and the preview will overflow.
full: Generate a non-overflowing preview with as many properties as possible. For very large objects, some properties may be omitted from the result.

Allowed Values: none, noProperties, canOverflow, full

Type: string

Pause.PauseData

Block of data from this pause which might be useful to the protocol client. To reduce the number of back-and-forth calls required over the protocol, data which wasn't specifically asked for can be returned by commands or events. PauseData objects will not duplicate data from a PauseData object produced earlier for the same pause.

Type: object

properties
frames
array[ Frame ]
scopes
array[ Scope ]
objects
array[ Object ]

Pause.PauseId

Unique identifier for a pause session where the program state can be inspected. Pauses are each associated with a specific execution point, and when created reflect the program state when it reached that point. Operations on a pause can have side effects due to evaluations and so forth. These side effects will affect later results produced for the same pause, but will have no effect on the state of the program in other pauses.

Type: string

Pause.PromiseState

The possible states for a promise.

Allowed Values: pending, fulfilled, rejected

Type: string

Pause.PromiseStateData

The internal state data of a promise.

Type: object

properties
state
PromiseState

The resolution state.

value
Value

The fulfilled/rejected value, if not pending.

Pause.Property

Description of an object's own property. The NamedValue members indicate the property's name and its value if it is a data descriptor.

Type: NamedValue

properties
flags
PropertyConfigurationFlags

Configuration flags for the property, omitted if the property is writable, configurable, and enumerable (a bitmask of 7).

get
ObjectId

Any getter function if this is an accessor property.

set
ObjectId

Any setter function if this is an accessor property.

isSymbol
boolean

Set if this property's name is a symbol.

Pause.PropertyConfigurationFlags

Compact bitmask of configuration flags on a property. Possible values in the mask are 1 (whether the property is writable), 2 (whether the property is configurable), 4 (whether the property is enumerable), and combinations of these values using bitwise-or.

Type: integer

Pause.ProxyStateData

The internal state data of a proxy.

Type: object

properties
target
Value

The target value the proxy was initialized with. May reference an object or null.

handler
Value

The handler value the proxy was initialized with. May reference an object or null.

Pause.Result

Result of performing an effectful operation.

Type: object

properties
returned
Value

If the operation returned normally, the returned value.

exception
Value

If the operation threw an exception, the thrown value.

failed
boolean

Set if the operation failed and no value was returned or thrown. This can happen when operations interact with the system in an unsupported way (such as by calling dump()) or if the evaluation took too long and was forcibly terminated.

data
PauseData

Any additional data associated with the returned/thrown value.

Pause.Scope

Description of a scope.

Type: object

properties
scopeId
ScopeId

ID of this scope.

type
ScopeType

Type of this scope.

functionLexical
boolean

Set for the top-level lexical scope of a function.

object
ObjectId

For global and with scopes, the underlying object.

functionName
string

For function scopes, the name of the called function.

bindings
array[ NamedValue ]

For function and block scopes, the scope bindings.

Pause.ScopeId

Identifier for a scope in a pause.

Type: string

Pause.ScopeType

Possible types of a scope.

Allowed Values: global, with, function, block

Type: string

Pause.Value

Description of a value. At most one property will be specified. If no properties are specified, the value is undefined.

Type: object

properties
value
any

For non-object values that are valid JSON values. Long strings may be truncated.

object
ObjectId

For object values.

unserializableNumber
string

String representation of a number that is not a valid JSON value: -0, Infinity, -Infinity, and NaN.

bigint
string

String representation of a bigint.

symbol
string

String representation of a symbol.

uninitialized
boolean

Set for values of variables which haven't been initialized yet.

unavailable
boolean

Set for values which are not available for some reason.