Skip to main content
Evaluate JavaScript in the page (or a specific frame/context, or the paused call frame) and return the value or the exception. Objects come back as previews with an objectId for devtools_console inspect. awaitPromise defaults to true.

Parameters

integer
Target tab id from browser_tabs, which lists tabs across all windows. Defaults to the agent’s most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
string
required
 
integer
Execution context id from devtools_sources frames
string
Frame id; picks its default context
string
Evaluate in a paused call frame (devtools_debugger stack)
boolean
 
boolean
Default true; false keeps a live object handle
integer
Range: 0 to 4.

Example

In the paused call frame