Mpost
Bun

method

inspector.Session.post

method: string,
callback?: (err: null | Error, params?: object) => void
): void;

Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments: error and message-specific result.

session.post('Runtime.evaluate', { expression: '2 + 2' },
             (error, { result }) => console.log(result));
// Output: { type: 'number', value: 4, description: '4' }

The latest version of the V8 inspector protocol is published on the Chrome DevTools Protocol Viewer.

Node.js inspector supports all the Chrome DevTools Protocol domains declared by V8. Chrome DevTools Protocol domain provides an interface for interacting with one of the runtime agents used to inspect the application state and listen to the run-time events.

method: string,
params?: object,
callback?: (err: null | Error, params?: object) => void
): void;
method: 'Schema.getDomains',
callback?: (err: null | Error, params: GetDomainsReturnType) => void
): void;

Returns supported domains.

method: 'Runtime.evaluate',
callback?: (err: null | Error, params: EvaluateReturnType) => void
): void;

Evaluates expression on global object.

method: 'Runtime.evaluate',
callback?: (err: null | Error, params: EvaluateReturnType) => void
): void;
method: 'Runtime.awaitPromise',
callback?: (err: null | Error, params: AwaitPromiseReturnType) => void
): void;

Add handler to promise with given promise object id.

method: 'Runtime.awaitPromise',
callback?: (err: null | Error, params: AwaitPromiseReturnType) => void
): void;
method: 'Runtime.callFunctionOn',
callback?: (err: null | Error, params: CallFunctionOnReturnType) => void
): void;

Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

method: 'Runtime.callFunctionOn',
callback?: (err: null | Error, params: CallFunctionOnReturnType) => void
): void;
method: 'Runtime.getProperties',
callback?: (err: null | Error, params: GetPropertiesReturnType) => void
): void;

Returns properties of a given object. Object group of the result is inherited from the target object.

method: 'Runtime.getProperties',
callback?: (err: null | Error, params: GetPropertiesReturnType) => void
): void;
method: 'Runtime.releaseObject',
callback?: (err: null | Error) => void
): void;

Releases remote object with given id.

method: 'Runtime.releaseObject',
callback?: (err: null | Error) => void
): void;
method: 'Runtime.releaseObjectGroup',
callback?: (err: null | Error) => void
): void;

Releases all remote objects that belong to a given group.

method: 'Runtime.releaseObjectGroup',
callback?: (err: null | Error) => void
): void;
method: 'Runtime.runIfWaitingForDebugger',
callback?: (err: null | Error) => void
): void;

Tells inspected instance to run if it was waiting for debugger to attach.

method: 'Runtime.enable',
callback?: (err: null | Error) => void
): void;

Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.

method: 'Runtime.disable',
callback?: (err: null | Error) => void
): void;

Disables reporting of execution contexts creation.

method: 'Runtime.discardConsoleEntries',
callback?: (err: null | Error) => void
): void;

Discards collected exceptions and console API calls.

method: 'Runtime.setCustomObjectFormatterEnabled',
callback?: (err: null | Error) => void
): void;
method: 'Runtime.setCustomObjectFormatterEnabled',
callback?: (err: null | Error) => void
): void;
method: 'Runtime.compileScript',
callback?: (err: null | Error, params: CompileScriptReturnType) => void
): void;

Compiles expression.

method: 'Runtime.compileScript',
callback?: (err: null | Error, params: CompileScriptReturnType) => void
): void;
method: 'Runtime.runScript',
callback?: (err: null | Error, params: RunScriptReturnType) => void
): void;

Runs script with given id in a given context.

method: 'Runtime.runScript',
callback?: (err: null | Error, params: RunScriptReturnType) => void
): void;
method: 'Runtime.queryObjects',
callback?: (err: null | Error, params: QueryObjectsReturnType) => void
): void;
method: 'Runtime.queryObjects',
callback?: (err: null | Error, params: QueryObjectsReturnType) => void
): void;
method: 'Runtime.globalLexicalScopeNames',
callback?: (err: null | Error, params: GlobalLexicalScopeNamesReturnType) => void
): void;

Returns all let, const and class variables from global scope.

method: 'Runtime.globalLexicalScopeNames',
callback?: (err: null | Error, params: GlobalLexicalScopeNamesReturnType) => void
): void;
method: 'Debugger.enable',
callback?: (err: null | Error, params: EnableReturnType) => void
): void;

Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

method: 'Debugger.disable',
callback?: (err: null | Error) => void
): void;

Disables debugger for given page.

method: 'Debugger.setBreakpointsActive',
callback?: (err: null | Error) => void
): void;

Activates / deactivates all breakpoints on the page.

method: 'Debugger.setBreakpointsActive',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.setSkipAllPauses',
callback?: (err: null | Error) => void
): void;

Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).

method: 'Debugger.setSkipAllPauses',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.setBreakpointByUrl',
callback?: (err: null | Error, params: SetBreakpointByUrlReturnType) => void
): void;

Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.

method: 'Debugger.setBreakpointByUrl',
callback?: (err: null | Error, params: SetBreakpointByUrlReturnType) => void
): void;
method: 'Debugger.setBreakpoint',
callback?: (err: null | Error, params: SetBreakpointReturnType) => void
): void;

Sets JavaScript breakpoint at a given location.

method: 'Debugger.setBreakpoint',
callback?: (err: null | Error, params: SetBreakpointReturnType) => void
): void;
method: 'Debugger.removeBreakpoint',
callback?: (err: null | Error) => void
): void;

Removes JavaScript breakpoint.

method: 'Debugger.removeBreakpoint',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.getPossibleBreakpoints',
callback?: (err: null | Error, params: GetPossibleBreakpointsReturnType) => void
): void;

Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.

method: 'Debugger.getPossibleBreakpoints',
callback?: (err: null | Error, params: GetPossibleBreakpointsReturnType) => void
): void;
method: 'Debugger.continueToLocation',
callback?: (err: null | Error) => void
): void;

Continues execution until specific location is reached.

method: 'Debugger.continueToLocation',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.pauseOnAsyncCall',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.pauseOnAsyncCall',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.stepOver',
callback?: (err: null | Error) => void
): void;

Steps over the statement.

method: 'Debugger.stepInto',
callback?: (err: null | Error) => void
): void;

Steps into the function call.

method: 'Debugger.stepInto',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.stepOut',
callback?: (err: null | Error) => void
): void;

Steps out of the function call.

method: 'Debugger.pause',
callback?: (err: null | Error) => void
): void;

Stops on the next JavaScript statement.

method: 'Debugger.resume',
callback?: (err: null | Error) => void
): void;

Resumes JavaScript execution.

method: 'Debugger.getStackTrace',
callback?: (err: null | Error, params: GetStackTraceReturnType) => void
): void;

Returns stack trace with given <code>stackTraceId</code>.

method: 'Debugger.getStackTrace',
callback?: (err: null | Error, params: GetStackTraceReturnType) => void
): void;
method: 'Debugger.searchInContent',
callback?: (err: null | Error, params: SearchInContentReturnType) => void
): void;

Searches for given string in script content.

method: 'Debugger.searchInContent',
callback?: (err: null | Error, params: SearchInContentReturnType) => void
): void;
method: 'Debugger.setScriptSource',
callback?: (err: null | Error, params: SetScriptSourceReturnType) => void
): void;

Edits JavaScript source live.

method: 'Debugger.setScriptSource',
callback?: (err: null | Error, params: SetScriptSourceReturnType) => void
): void;
method: 'Debugger.restartFrame',
callback?: (err: null | Error, params: RestartFrameReturnType) => void
): void;

Restarts particular call frame from the beginning.

method: 'Debugger.restartFrame',
callback?: (err: null | Error, params: RestartFrameReturnType) => void
): void;
method: 'Debugger.getScriptSource',
callback?: (err: null | Error, params: GetScriptSourceReturnType) => void
): void;

Returns source for the script with given id.

method: 'Debugger.getScriptSource',
callback?: (err: null | Error, params: GetScriptSourceReturnType) => void
): void;
method: 'Debugger.setPauseOnExceptions',
callback?: (err: null | Error) => void
): void;

Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.

method: 'Debugger.setPauseOnExceptions',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.evaluateOnCallFrame',
callback?: (err: null | Error, params: EvaluateOnCallFrameReturnType) => void
): void;

Evaluates expression on a given call frame.

method: 'Debugger.evaluateOnCallFrame',
callback?: (err: null | Error, params: EvaluateOnCallFrameReturnType) => void
): void;
method: 'Debugger.setVariableValue',
callback?: (err: null | Error) => void
): void;

Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.

method: 'Debugger.setVariableValue',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.setReturnValue',
callback?: (err: null | Error) => void
): void;

Changes return value in top frame. Available only at return break position.

method: 'Debugger.setReturnValue',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.setAsyncCallStackDepth',
callback?: (err: null | Error) => void
): void;

Enables or disables async call stacks tracking.

method: 'Debugger.setAsyncCallStackDepth',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.setBlackboxPatterns',
callback?: (err: null | Error) => void
): void;

Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.

method: 'Debugger.setBlackboxPatterns',
callback?: (err: null | Error) => void
): void;
method: 'Debugger.setBlackboxedRanges',
callback?: (err: null | Error) => void
): void;

Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.

method: 'Debugger.setBlackboxedRanges',
callback?: (err: null | Error) => void
): void;
method: 'Console.enable',
callback?: (err: null | Error) => void
): void;

Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.

method: 'Console.disable',
callback?: (err: null | Error) => void
): void;

Disables console domain, prevents further console messages from being reported to the client.

method: 'Console.clearMessages',
callback?: (err: null | Error) => void
): void;

Does nothing.

method: 'Profiler.enable',
callback?: (err: null | Error) => void
): void;
method: 'Profiler.disable',
callback?: (err: null | Error) => void
): void;
method: 'Profiler.setSamplingInterval',
callback?: (err: null | Error) => void
): void;

Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

method: 'Profiler.setSamplingInterval',
callback?: (err: null | Error) => void
): void;
method: 'Profiler.start',
callback?: (err: null | Error) => void
): void;
method: 'Profiler.stop',
callback?: (err: null | Error, params: StopReturnType) => void
): void;
method: 'Profiler.startPreciseCoverage',
callback?: (err: null | Error) => void
): void;

Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

method: 'Profiler.startPreciseCoverage',
callback?: (err: null | Error) => void
): void;
method: 'Profiler.stopPreciseCoverage',
callback?: (err: null | Error) => void
): void;

Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

method: 'Profiler.takePreciseCoverage',
callback?: (err: null | Error, params: TakePreciseCoverageReturnType) => void
): void;

Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.

method: 'Profiler.getBestEffortCoverage',
callback?: (err: null | Error, params: GetBestEffortCoverageReturnType) => void
): void;

Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.

method: 'HeapProfiler.enable',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.disable',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.startTrackingHeapObjects',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.startTrackingHeapObjects',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.stopTrackingHeapObjects',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.stopTrackingHeapObjects',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.takeHeapSnapshot',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.takeHeapSnapshot',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.collectGarbage',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.getObjectByHeapObjectId',
callback?: (err: null | Error, params: GetObjectByHeapObjectIdReturnType) => void
): void;
method: 'HeapProfiler.getObjectByHeapObjectId',
callback?: (err: null | Error, params: GetObjectByHeapObjectIdReturnType) => void
): void;
method: 'HeapProfiler.addInspectedHeapObject',
callback?: (err: null | Error) => void
): void;

Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

method: 'HeapProfiler.addInspectedHeapObject',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.getHeapObjectId',
callback?: (err: null | Error, params: GetHeapObjectIdReturnType) => void
): void;
method: 'HeapProfiler.getHeapObjectId',
callback?: (err: null | Error, params: GetHeapObjectIdReturnType) => void
): void;
method: 'HeapProfiler.startSampling',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.startSampling',
callback?: (err: null | Error) => void
): void;
method: 'HeapProfiler.stopSampling',
callback?: (err: null | Error, params: StopSamplingReturnType) => void
): void;
method: 'HeapProfiler.getSamplingProfile',
callback?: (err: null | Error, params: GetSamplingProfileReturnType) => void
): void;
method: 'NodeTracing.getCategories',
callback?: (err: null | Error, params: GetCategoriesReturnType) => void
): void;

Gets supported tracing categories.

method: 'NodeTracing.start',
callback?: (err: null | Error) => void
): void;

Start trace events collection.

method: 'NodeTracing.start',
callback?: (err: null | Error) => void
): void;
method: 'NodeTracing.stop',
callback?: (err: null | Error) => void
): void;

Stop trace events collection. Remaining collected events will be sent as a sequence of dataCollected events followed by tracingComplete event.

method: 'NodeWorker.sendMessageToWorker',
callback?: (err: null | Error) => void
): void;

Sends protocol message over session with given id.

method: 'NodeWorker.sendMessageToWorker',
callback?: (err: null | Error) => void
): void;
method: 'NodeWorker.enable',
callback?: (err: null | Error) => void
): void;

Instructs the inspector to attach to running workers. Will also attach to new workers as they start

method: 'NodeWorker.enable',
callback?: (err: null | Error) => void
): void;
method: 'NodeWorker.disable',
callback?: (err: null | Error) => void
): void;

Detaches from all running workers and disables attaching to new workers as they are started.

method: 'NodeWorker.detach',
callback?: (err: null | Error) => void
): void;

Detached from the worker with given sessionId.

method: 'NodeWorker.detach',
callback?: (err: null | Error) => void
): void;
method: 'Network.disable',
callback?: (err: null | Error) => void
): void;

Disables network tracking, prevents network events from being sent to the client.

method: 'Network.enable',
callback?: (err: null | Error) => void
): void;

Enables network tracking, network events will now be delivered to the client.

method: 'Network.getRequestPostData',
callback?: (err: null | Error, params: GetRequestPostDataReturnType) => void
): void;

Returns post data sent with the request. Returns an error when no data was sent with the request.

method: 'Network.getRequestPostData',
callback?: (err: null | Error, params: GetRequestPostDataReturnType) => void
): void;
method: 'Network.getResponseBody',
callback?: (err: null | Error, params: GetResponseBodyReturnType) => void
): void;

Returns content served for the given request.

method: 'Network.getResponseBody',
callback?: (err: null | Error, params: GetResponseBodyReturnType) => void
): void;
method: 'Network.streamResourceContent',
callback?: (err: null | Error, params: StreamResourceContentReturnType) => void
): void;

Enables streaming of the response for the given requestId. If enabled, the dataReceived event contains the data that was received during streaming.

method: 'Network.streamResourceContent',
callback?: (err: null | Error, params: StreamResourceContentReturnType) => void
): void;
method: 'Network.loadNetworkResource',
callback?: (err: null | Error, params: LoadNetworkResourceReturnType) => void
): void;

Fetches the resource and returns the content.

method: 'Network.loadNetworkResource',
callback?: (err: null | Error, params: LoadNetworkResourceReturnType) => void
): void;
method: 'NodeRuntime.enable',
callback?: (err: null | Error) => void
): void;

Enable the NodeRuntime events except by NodeRuntime.waitingForDisconnect.

method: 'NodeRuntime.disable',
callback?: (err: null | Error) => void
): void;

Disable NodeRuntime events

method: 'NodeRuntime.notifyWhenWaitingForDisconnect',
callback?: (err: null | Error) => void
): void;

Enable the NodeRuntime.waitingForDisconnect.

method: 'NodeRuntime.notifyWhenWaitingForDisconnect',
callback?: (err: null | Error) => void
): void;
method: 'Target.setAutoAttach',
callback?: (err: null | Error) => void
): void;
method: 'Target.setAutoAttach',
callback?: (err: null | Error) => void
): void;
method: 'IO.read',
callback?: (err: null | Error, params: ReadReturnType) => void
): void;

Read a chunk of the stream

method: 'IO.read',
callback?: (err: null | Error, params: ReadReturnType) => void
): void;
method: 'IO.close',
callback?: (err: null | Error) => void
): void;
method: 'IO.close',
callback?: (err: null | Error) => void
): void;

Referenced types

interface EvaluateParameterType

  • awaitPromise?: boolean

    Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.

  • contextId?: number

    Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.

  • expression: string

    Expression to evaluate.

  • generatePreview?: boolean

    Whether preview should be generated for the result.

  • includeCommandLineAPI?: boolean

    Determines whether Command Line API should be available during the evaluation.

  • objectGroup?: string

    Symbolic group name that can be used to release multiple objects.

  • returnByValue?: boolean

    Whether the result is expected to be a JSON object that should be sent by value.

  • silent?: boolean

    In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.

  • userGesture?: boolean

    Whether execution should be treated as initiated by user in the UI.

interface AwaitPromiseParameterType

  • generatePreview?: boolean

    Whether preview should be generated for the result.

  • promiseObjectId: string

    Identifier of the promise.

  • returnByValue?: boolean

    Whether the result is expected to be a JSON object that should be sent by value.

interface CallFunctionOnParameterType

  • arguments?: CallArgument[]

    Call arguments. All call arguments must belong to the same JavaScript world as the target object.

  • awaitPromise?: boolean

    Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.

  • executionContextId?: number

    Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.

  • functionDeclaration: string

    Declaration of the function to call.

  • generatePreview?: boolean

    Whether preview should be generated for the result.

  • objectGroup?: string

    Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.

  • objectId?: string

    Identifier of the object to call function on. Either objectId or executionContextId should be specified.

  • returnByValue?: boolean

    Whether the result is expected to be a JSON object which should be sent by value.

  • silent?: boolean

    In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.

  • userGesture?: boolean

    Whether execution should be treated as initiated by user in the UI.

interface GetPropertiesParameterType

  • accessorPropertiesOnly?: boolean

    If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.

  • generatePreview?: boolean

    Whether preview should be generated for the results.

  • objectId: string

    Identifier of the object to return properties for.

  • ownProperties?: boolean

    If true, returns properties belonging only to the element itself, not to its prototype chain.

interface ReleaseObjectParameterType

  • objectId: string

    Identifier of the object to release.

interface ReleaseObjectGroupParameterType

interface CompileScriptParameterType

  • executionContextId?: number

    Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.

  • expression: string

    Expression to compile.

  • persistScript: boolean

    Specifies whether the compiled script should be persisted.

  • sourceURL: string

    Source url to be set for the script.

interface RunScriptParameterType

  • awaitPromise?: boolean

    Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.

  • executionContextId?: number

    Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.

  • generatePreview?: boolean

    Whether preview should be generated for the result.

  • includeCommandLineAPI?: boolean

    Determines whether Command Line API should be available during the evaluation.

  • objectGroup?: string

    Symbolic group name that can be used to release multiple objects.

  • returnByValue?: boolean

    Whether the result is expected to be a JSON object which should be sent by value.

  • scriptId: string

    Id of the script to run.

  • silent?: boolean

    In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.

interface QueryObjectsParameterType

interface GlobalLexicalScopeNamesParameterType

  • executionContextId?: number

    Specifies in which execution context to lookup global scope variables.

interface SetBreakpointsActiveParameterType

  • active: boolean

    New value for breakpoints active state.

interface SetSkipAllPausesParameterType

  • skip: boolean

    New value for skip pauses state.

interface SetBreakpointByUrlParameterType

  • columnNumber?: number

    Offset in the line to set breakpoint at.

  • condition?: string

    Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.

  • lineNumber: number

    Line number to set breakpoint at.

  • scriptHash?: string

    Script hash of the resources to set breakpoint on.

  • url?: string

    URL of the resources to set breakpoint on.

  • urlRegex?: string

    Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.

interface SetBreakpointParameterType

  • condition?: string

    Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.

  • location: Location

    Location to set breakpoint in.

interface GetPossibleBreakpointsParameterType

  • end?: Location

    End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.

  • restrictToFunction?: boolean

    Only consider locations which are in the same (non-nested) function as start.

  • start: Location

    Start of range to search possible breakpoint locations in.

interface ContinueToLocationParameterType

interface PauseOnAsyncCallParameterType

interface StepIntoParameterType

  • breakOnAsyncCall?: boolean

    Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.

interface SearchInContentParameterType

  • caseSensitive?: boolean

    If true, search is case sensitive.

  • isRegex?: boolean

    If true, treats string parameter as regex.

  • query: string

    String to search for.

  • scriptId: string

    Id of the script to search in.

interface SetScriptSourceParameterType

  • dryRun?: boolean

    If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.

  • scriptId: string

    Id of the script to edit.

  • scriptSource: string

    New content of the script.

interface RestartFrameParameterType

  • callFrameId: string

    Call frame identifier to evaluate on.

interface GetScriptSourceParameterType

  • scriptId: string

    Id of the script to get source for.

interface SetPauseOnExceptionsParameterType

  • state: string

    Pause on exceptions mode.

interface EvaluateOnCallFrameParameterType

  • callFrameId: string

    Call frame identifier to evaluate on.

  • expression: string

    Expression to evaluate.

  • generatePreview?: boolean

    Whether preview should be generated for the result.

  • includeCommandLineAPI?: boolean

    Specifies whether command line API should be available to the evaluated expression, defaults to false.

  • objectGroup?: string

    String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).

  • returnByValue?: boolean

    Whether the result is expected to be a JSON object that should be sent by value.

  • silent?: boolean

    In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.

  • throwOnSideEffect?: boolean

    Whether to throw an exception if side effect cannot be ruled out during evaluation.

interface SetVariableValueParameterType

  • callFrameId: string

    Id of callframe that holds variable.

  • newValue: CallArgument

    New variable value.

  • scopeNumber: number

    0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.

  • variableName: string

    Variable name.

interface SetAsyncCallStackDepthParameterType

  • maxDepth: number

    Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).

interface SetBlackboxPatternsParameterType

  • patterns: string[]

    Array of regexps that will be used to check script url for blackbox state.

interface SetSamplingIntervalParameterType

  • interval: number

    New sampling interval in microseconds.

interface StartPreciseCoverageParameterType

  • callCount?: boolean

    Collect accurate call counts beyond simple 'covered' or 'not covered'.

  • detailed?: boolean

    Collect block-based coverage.

interface StopTrackingHeapObjectsParameterType

  • reportProgress?: boolean

    If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.

interface TakeHeapSnapshotParameterType

  • reportProgress?: boolean

    If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.

interface GetObjectByHeapObjectIdParameterType

  • objectGroup?: string

    Symbolic group name that can be used to release multiple objects.

  • objectId: string

interface AddInspectedHeapObjectParameterType

  • heapObjectId: string

    Heap snapshot object id to be accessible by means of $x command line API.

interface GetHeapObjectIdParameterType

  • objectId: string

    Identifier of the object to get heap object id for.

interface StartSamplingParameterType

  • samplingInterval?: number

    Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.

interface SendMessageToWorkerParameterType

interface EnableParameterType

  • waitForDebuggerOnStart: boolean

    Whether to new workers should be paused until the frontend sends Runtime.runIfWaitingForDebugger message to run them.

interface GetRequestPostDataParameterType

  • requestId: string

    Identifier of the network request to get content for.

interface GetResponseBodyParameterType

  • requestId: string

    Identifier of the network request to get content for.

interface StreamResourceContentParameterType

  • requestId: string

    Identifier of the request to stream.

interface LoadNetworkResourceParameterType

  • url: string

    URL of the resource to get content for.

interface ReadParameterType

  • handle: string

    Handle of the stream to read.

  • offset?: number

    Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.

  • size?: number

    Maximum number of bytes to read (left upon the agent discretion if not specified).

interface CloseParameterType

  • handle: string

    Handle of the stream to close.