Skip to main content
method Session.prototype.post
unstable
Session.prototype.post(
method: string,
callback?: (
err: Error | null,
params?: object,
) => void
,
): void
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

Parameters

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

Return Type

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

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
Deprecated

Parameters

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

Return Type

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

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

Parameters

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

Return Type

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

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
Deprecated

Parameters

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

Return Type

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

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

Parameters

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

Return Type

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

Parameters

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

Return Type

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

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

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
Deprecated

Parameters

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

Return Type

void
Back to top