Skip to main content
Session.prototype.post - inspector - Node documentation
method Session.prototype.post
Unstable

Usage in Deno

import { Session } from "node:inspector";
Session.prototype.post(
method: string,
callback?: (
err: Error | null,
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.

Parameters

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

Return Type

void
Session.prototype.post(
method: string,
params?: object,
callback?: (
err: Error | null,
params?: object,
) => void
,
): void

Parameters

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

Return Type

void
Session.prototype.post(
method: "Schema.getDomains",
callback?: (
err: Error | null,
) => void
,
): void

Returns supported domains.

Parameters

method: "Schema.getDomains"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.evaluate",
callback?: (
err: Error | null,
) => void
,
): void

Evaluates expression on global object.

Parameters

method: "Runtime.evaluate"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.evaluate",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.evaluate"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.awaitPromise",
callback?: (
err: Error | null,
) => void
,
): void

Add handler to promise with given promise object id.

Parameters

method: "Runtime.awaitPromise"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.awaitPromise",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.awaitPromise"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.callFunctionOn",
callback?: (
err: Error | null,
) => void
,
): void

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

Parameters

method: "Runtime.callFunctionOn"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.callFunctionOn",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.callFunctionOn"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.getProperties",
callback?: (
err: Error | null,
) => void
,
): void

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

Parameters

method: "Runtime.getProperties"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.getProperties",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.getProperties"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.releaseObject",
callback?: (err: Error | null) => void,
): void

Releases remote object with given id.

Parameters

method: "Runtime.releaseObject"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.releaseObject",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Runtime.releaseObject"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.releaseObjectGroup",
callback?: (err: Error | null) => void,
): void

Releases all remote objects that belong to a given group.

Parameters

method: "Runtime.releaseObjectGroup"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.releaseObjectGroup",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Runtime.releaseObjectGroup"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.runIfWaitingForDebugger",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Runtime.runIfWaitingForDebugger"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.enable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Runtime.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.disable",
callback?: (err: Error | null) => void,
): void

Disables reporting of execution contexts creation.

Parameters

method: "Runtime.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.discardConsoleEntries",
callback?: (err: Error | null) => void,
): void

Discards collected exceptions and console API calls.

Parameters

method: "Runtime.discardConsoleEntries"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.setCustomObjectFormatterEnabled",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Runtime.setCustomObjectFormatterEnabled"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.setCustomObjectFormatterEnabled",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Runtime.setCustomObjectFormatterEnabled"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Runtime.compileScript",
callback?: (
err: Error | null,
) => void
,
): void

Compiles expression.

Parameters

method: "Runtime.compileScript"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.compileScript",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.compileScript"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.runScript",
callback?: (
err: Error | null,
) => void
,
): void

Runs script with given id in a given context.

Parameters

method: "Runtime.runScript"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.runScript",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.runScript"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.queryObjects",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.queryObjects"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.queryObjects",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Runtime.queryObjects"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Runtime.globalLexicalScopeNames",
callback?: () => void,
): void

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

Parameters

method: "Runtime.globalLexicalScopeNames"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "Runtime.globalLexicalScopeNames",
callback?: () => void,
): void

Parameters

method: "Runtime.globalLexicalScopeNames"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "Debugger.enable",
callback?: (
err: Error | null,
) => 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.

Parameters

method: "Debugger.enable"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.disable",
callback?: (err: Error | null) => void,
): void

Disables debugger for given page.

Parameters

method: "Debugger.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBreakpointsActive",
callback?: (err: Error | null) => void,
): void

Activates / deactivates all breakpoints on the page.

Parameters

method: "Debugger.setBreakpointsActive"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBreakpointsActive",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setBreakpointsActive"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setSkipAllPauses",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Debugger.setSkipAllPauses"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setSkipAllPauses",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setSkipAllPauses"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBreakpointByUrl",
callback?: (
err: Error | null,
) => 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 locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.

Parameters

method: "Debugger.setBreakpointByUrl"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBreakpointByUrl",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.setBreakpointByUrl"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBreakpoint",
callback?: (
err: Error | null,
) => void
,
): void

Sets JavaScript breakpoint at a given location.

Parameters

method: "Debugger.setBreakpoint"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBreakpoint",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.setBreakpoint"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.removeBreakpoint",
callback?: (err: Error | null) => void,
): void

Removes JavaScript breakpoint.

Parameters

method: "Debugger.removeBreakpoint"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.removeBreakpoint",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.removeBreakpoint"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.getPossibleBreakpoints",
callback?: () => void,
): void

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

Parameters

method: "Debugger.getPossibleBreakpoints"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "Debugger.getPossibleBreakpoints",
callback?: () => void,
): void

Parameters

method: "Debugger.getPossibleBreakpoints"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "Debugger.continueToLocation",
callback?: (err: Error | null) => void,
): void

Continues execution until specific location is reached.

Parameters

method: "Debugger.continueToLocation"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.continueToLocation",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.continueToLocation"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.pauseOnAsyncCall",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.pauseOnAsyncCall"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.pauseOnAsyncCall",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.pauseOnAsyncCall"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.stepOver",
callback?: (err: Error | null) => void,
): void

Steps over the statement.

Parameters

method: "Debugger.stepOver"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.stepInto",
callback?: (err: Error | null) => void,
): void

Steps into the function call.

Parameters

method: "Debugger.stepInto"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.stepInto",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.stepInto"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.stepOut",
callback?: (err: Error | null) => void,
): void

Steps out of the function call.

Parameters

method: "Debugger.stepOut"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.pause",
callback?: (err: Error | null) => void,
): void

Stops on the next JavaScript statement.

Parameters

method: "Debugger.pause"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.scheduleStepIntoAsync",
callback?: (err: Error | null) => void,
): void

This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.

Parameters

method: "Debugger.scheduleStepIntoAsync"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.resume",
callback?: (err: Error | null) => void,
): void

Resumes JavaScript execution.

Parameters

method: "Debugger.resume"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.getStackTrace",
callback?: (
err: Error | null,
) => void
,
): void

Returns stack trace with given stackTraceId.

Parameters

method: "Debugger.getStackTrace"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.getStackTrace",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.getStackTrace"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.searchInContent",
callback?: (
err: Error | null,
) => void
,
): void

Searches for given string in script content.

Parameters

method: "Debugger.searchInContent"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.searchInContent",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.searchInContent"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setScriptSource",
callback?: (
err: Error | null,
) => void
,
): void

Edits JavaScript source live.

Parameters

method: "Debugger.setScriptSource"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setScriptSource",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.setScriptSource"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.restartFrame",
callback?: (
err: Error | null,
) => void
,
): void

Restarts particular call frame from the beginning.

Parameters

method: "Debugger.restartFrame"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.restartFrame",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.restartFrame"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.getScriptSource",
callback?: (
err: Error | null,
) => void
,
): void

Returns source for the script with given id.

Parameters

method: "Debugger.getScriptSource"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.getScriptSource",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.getScriptSource"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setPauseOnExceptions",
callback?: (err: Error | null) => 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 none.

Parameters

method: "Debugger.setPauseOnExceptions"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setPauseOnExceptions",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setPauseOnExceptions"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.evaluateOnCallFrame",
callback?: (
err: Error | null,
) => void
,
): void

Evaluates expression on a given call frame.

Parameters

method: "Debugger.evaluateOnCallFrame"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.evaluateOnCallFrame",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Debugger.evaluateOnCallFrame"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setVariableValue",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Debugger.setVariableValue"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setVariableValue",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setVariableValue"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setReturnValue",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Debugger.setReturnValue"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setReturnValue",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setReturnValue"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setAsyncCallStackDepth",
callback?: (err: Error | null) => void,
): void

Enables or disables async call stacks tracking.

Parameters

method: "Debugger.setAsyncCallStackDepth"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setAsyncCallStackDepth",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setAsyncCallStackDepth"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBlackboxPatterns",
callback?: (err: Error | null) => 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.

Parameters

method: "Debugger.setBlackboxPatterns"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBlackboxPatterns",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setBlackboxPatterns"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBlackboxedRanges",
callback?: (err: Error | null) => 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.

Parameters

method: "Debugger.setBlackboxedRanges"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Debugger.setBlackboxedRanges",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Debugger.setBlackboxedRanges"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Console.enable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Console.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Console.disable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Console.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Console.clearMessages",
callback?: (err: Error | null) => void,
): void

Does nothing.

Parameters

method: "Console.clearMessages"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.enable",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Profiler.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.disable",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Profiler.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.setSamplingInterval",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Profiler.setSamplingInterval"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.setSamplingInterval",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Profiler.setSamplingInterval"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.start",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Profiler.start"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.stop",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "Profiler.stop"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Profiler.startPreciseCoverage",
callback?: (err: Error | null) => 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.

Parameters

method: "Profiler.startPreciseCoverage"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.startPreciseCoverage",
callback?: (err: Error | null) => void,
): void

Parameters

method: "Profiler.startPreciseCoverage"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.stopPreciseCoverage",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Profiler.stopPreciseCoverage"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Profiler.takePreciseCoverage",
callback?: (
err: Error | null,
) => void
,
): void

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

Parameters

method: "Profiler.takePreciseCoverage"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "Profiler.getBestEffortCoverage",
callback?: (
err: Error | null,
) => void
,
): void

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

Parameters

method: "Profiler.getBestEffortCoverage"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.enable",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.disable",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.startTrackingHeapObjects",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.startTrackingHeapObjects"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.startTrackingHeapObjects",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.startTrackingHeapObjects"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.stopTrackingHeapObjects",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.stopTrackingHeapObjects"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.stopTrackingHeapObjects",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.stopTrackingHeapObjects"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.takeHeapSnapshot",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.takeHeapSnapshot"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.takeHeapSnapshot",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.takeHeapSnapshot"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.collectGarbage",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.collectGarbage"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.getObjectByHeapObjectId",
callback?: () => void,
): void

Parameters

method: "HeapProfiler.getObjectByHeapObjectId"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.getObjectByHeapObjectId",
callback?: () => void,
): void

Parameters

method: "HeapProfiler.getObjectByHeapObjectId"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.addInspectedHeapObject",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "HeapProfiler.addInspectedHeapObject"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.addInspectedHeapObject",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.addInspectedHeapObject"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.getHeapObjectId",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "HeapProfiler.getHeapObjectId"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.getHeapObjectId",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "HeapProfiler.getHeapObjectId"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.startSampling",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.startSampling"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.startSampling",
callback?: (err: Error | null) => void,
): void

Parameters

method: "HeapProfiler.startSampling"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.stopSampling",
callback?: (
err: Error | null,
) => void
,
): void

Parameters

method: "HeapProfiler.stopSampling"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "HeapProfiler.getSamplingProfile",
callback?: () => void,
): void

Parameters

method: "HeapProfiler.getSamplingProfile"
optional
callback: () => void

Return Type

void
Session.prototype.post(
method: "NodeTracing.getCategories",
callback?: (
err: Error | null,
) => void
,
): void

Gets supported tracing categories.

Parameters

method: "NodeTracing.getCategories"
optional
callback: (
err: Error | null,
) => void

Return Type

void
Session.prototype.post(
method: "NodeTracing.start",
callback?: (err: Error | null) => void,
): void

Start trace events collection.

Parameters

method: "NodeTracing.start"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeTracing.start",
callback?: (err: Error | null) => void,
): void

Parameters

method: "NodeTracing.start"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeTracing.stop",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "NodeTracing.stop"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.sendMessageToWorker",
callback?: (err: Error | null) => void,
): void

Sends protocol message over session with given id.

Parameters

method: "NodeWorker.sendMessageToWorker"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.sendMessageToWorker",
callback?: (err: Error | null) => void,
): void

Parameters

method: "NodeWorker.sendMessageToWorker"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.enable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "NodeWorker.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.enable",
callback?: (err: Error | null) => void,
): void

Parameters

method: "NodeWorker.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.disable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "NodeWorker.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.detach",
callback?: (err: Error | null) => void,
): void

Detached from the worker with given sessionId.

Parameters

method: "NodeWorker.detach"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeWorker.detach",
callback?: (err: Error | null) => void,
): void

Parameters

method: "NodeWorker.detach"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Network.disable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Network.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "Network.enable",
callback?: (err: Error | null) => void,
): void

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

Parameters

method: "Network.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeRuntime.enable",
callback?: (err: Error | null) => void,
): void

Enable the NodeRuntime events except by NodeRuntime.waitingForDisconnect.

Parameters

method: "NodeRuntime.enable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeRuntime.disable",
callback?: (err: Error | null) => void,
): void

Disable NodeRuntime events

Parameters

method: "NodeRuntime.disable"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeRuntime.notifyWhenWaitingForDisconnect",
callback?: (err: Error | null) => void,
): void

Enable the NodeRuntime.waitingForDisconnect.

Parameters

method: "NodeRuntime.notifyWhenWaitingForDisconnect"
optional
callback: (err: Error | null) => void

Return Type

void
Session.prototype.post(
method: "NodeRuntime.notifyWhenWaitingForDisconnect",
callback?: (err: Error | null) => void,
): void

Parameters

method: "NodeRuntime.notifyWhenWaitingForDisconnect"
optional
callback: (err: Error | null) => void

Return Type

void