postAsync

fun postAsync(method: String, params: Any = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Posts a message to the inspector back-end.

import { Session } from 'node:inspector/promises';
try {
const session = new Session();
session.connect();
const result = await session.post('Runtime.evaluate', { expression: '2 + 2' });
console.log(result);
} catch (error) {
console.error(error);
}
// Output: { result: { 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.


fun postAsync(method: SessionMethod.SCHEMA_GETDOMAINS): ERROR CLASS: Symbol not found for Promise<node/inspector/schema/GetDomainsReturnType>(source)

Returns supported domains.


fun postAsync(method: SessionMethod.RUNTIME_EVALUATE, params: EvaluateParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/EvaluateReturnType>(source)

Evaluates expression on global object.


fun postAsync(method: SessionMethod.RUNTIME_AWAITPROMISE, params: AwaitPromiseParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/AwaitPromiseReturnType>(source)

Add handler to promise with given promise object id.


fun postAsync(method: SessionMethod.RUNTIME_CALLFUNCTIONON, params: CallFunctionOnParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/CallFunctionOnReturnType>(source)

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


fun postAsync(method: SessionMethod.RUNTIME_GETPROPERTIES, params: GetPropertiesParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/GetPropertiesReturnType>(source)

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


fun postAsync(method: SessionMethod.RUNTIME_RELEASEOBJECT, params: ReleaseObjectParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Releases remote object with given id.


fun postAsync(method: SessionMethod.RUNTIME_RELEASEOBJECTGROUP, params: ReleaseObjectGroupParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Releases all remote objects that belong to a given group.


fun postAsync(method: SessionMethod.RUNTIME_RUNIFWAITINGFORDEBUGGER): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.RUNTIME_ENABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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.


fun postAsync(method: SessionMethod.RUNTIME_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Disables reporting of execution contexts creation.


fun postAsync(method: SessionMethod.RUNTIME_DISCARDCONSOLEENTRIES): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Discards collected exceptions and console API calls.


fun postAsync(method: SessionMethod.RUNTIME_SETCUSTOMOBJECTFORMATTERENABLED, params: SetCustomObjectFormatterEnabledParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.RUNTIME_QUERYOBJECTS, params: QueryObjectsParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/QueryObjectsReturnType>(source)
fun postAsync(method: SessionMethod.DEBUGGER_PAUSEONASYNCCALL, params: PauseOnAsyncCallParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.PROFILER_ENABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.PROFILER_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.PROFILER_START): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.PROFILER_STOP): ERROR CLASS: Symbol not found for Promise<node/inspector/profiler/StopReturnType>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_ENABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_STARTTRACKINGHEAPOBJECTS, params: StartTrackingHeapObjectsParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_STOPTRACKINGHEAPOBJECTS, params: StopTrackingHeapObjectsParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_TAKEHEAPSNAPSHOT, params: TakeHeapSnapshotParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_COLLECTGARBAGE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_GETOBJECTBYHEAPOBJECTID, params: GetObjectByHeapObjectIdParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/heapProfiler/GetObjectByHeapObjectIdReturnType>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_GETHEAPOBJECTID, params: GetHeapObjectIdParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/heapProfiler/GetHeapObjectIdReturnType>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_STARTSAMPLING, params: StartSamplingParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_STOPSAMPLING): ERROR CLASS: Symbol not found for Promise<node/inspector/heapProfiler/StopSamplingReturnType>(source)
fun postAsync(method: SessionMethod.HEAPPROFILER_GETSAMPLINGPROFILE): ERROR CLASS: Symbol not found for Promise<node/inspector/heapProfiler/GetSamplingProfileReturnType>(source)
fun postAsync(method: SessionMethod.TARGET_SETAUTOATTACH, params: SetAutoAttachParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)


fun postAsync(method: SessionMethod.RUNTIME_COMPILESCRIPT, params: CompileScriptParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/CompileScriptReturnType>(source)

Compiles expression.


fun postAsync(method: SessionMethod.RUNTIME_RUNSCRIPT, params: RunScriptParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/RunScriptReturnType>(source)

Runs script with given id in a given context.


fun postAsync(method: SessionMethod.RUNTIME_GLOBALLEXICALSCOPENAMES, params: GlobalLexicalScopeNamesParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/runtime/GlobalLexicalScopeNamesReturnType>(source)

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


fun postAsync(method: SessionMethod.DEBUGGER_ENABLE): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/EnableReturnType>(source)

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


fun postAsync(method: SessionMethod.DEBUGGER_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Disables debugger for given page.


fun postAsync(method: SessionMethod.DEBUGGER_SETBREAKPOINTSACTIVE, params: SetBreakpointsActiveParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Activates / deactivates all breakpoints on the page.


fun postAsync(method: SessionMethod.DEBUGGER_SETSKIPALLPAUSES, params: SetSkipAllPausesParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.DEBUGGER_SETBREAKPOINTBYURL, params: SetBreakpointByUrlParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/SetBreakpointByUrlReturnType>(source)

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.


fun postAsync(method: SessionMethod.DEBUGGER_SETBREAKPOINT, params: SetBreakpointParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/SetBreakpointReturnType>(source)

Sets JavaScript breakpoint at a given location.


fun postAsync(method: SessionMethod.DEBUGGER_REMOVEBREAKPOINT, params: RemoveBreakpointParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Removes JavaScript breakpoint.


fun postAsync(method: SessionMethod.DEBUGGER_GETPOSSIBLEBREAKPOINTS, params: GetPossibleBreakpointsParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/GetPossibleBreakpointsReturnType>(source)

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


fun postAsync(method: SessionMethod.DEBUGGER_CONTINUETOLOCATION, params: ContinueToLocationParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Continues execution until specific location is reached.


fun postAsync(method: SessionMethod.DEBUGGER_STEPOVER): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Steps over the statement.


fun postAsync(method: SessionMethod.DEBUGGER_STEPINTO, params: StepIntoParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Steps into the function call.


fun postAsync(method: SessionMethod.DEBUGGER_STEPOUT): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Steps out of the function call.


fun postAsync(method: SessionMethod.DEBUGGER_PAUSE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Stops on the next JavaScript statement.


fun postAsync(method: SessionMethod.DEBUGGER_SCHEDULESTEPINTOASYNC): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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.


fun postAsync(method: SessionMethod.DEBUGGER_RESUME): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Resumes JavaScript execution.


fun postAsync(method: SessionMethod.DEBUGGER_GETSTACKTRACE, params: GetStackTraceParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/GetStackTraceReturnType>(source)

Returns stack trace with given stackTraceId.


fun postAsync(method: SessionMethod.DEBUGGER_SEARCHINCONTENT, params: SearchInContentParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/SearchInContentReturnType>(source)

Searches for given string in script content.


fun postAsync(method: SessionMethod.DEBUGGER_SETSCRIPTSOURCE, params: SetScriptSourceParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/SetScriptSourceReturnType>(source)

Edits JavaScript source live.


fun postAsync(method: SessionMethod.DEBUGGER_RESTARTFRAME, params: RestartFrameParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/RestartFrameReturnType>(source)

Restarts particular call frame from the beginning.


fun postAsync(method: SessionMethod.DEBUGGER_GETSCRIPTSOURCE, params: GetScriptSourceParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/GetScriptSourceReturnType>(source)

Returns source for the script with given id.


fun postAsync(method: SessionMethod.DEBUGGER_SETPAUSEONEXCEPTIONS, params: SetPauseOnExceptionsParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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.


fun postAsync(method: SessionMethod.DEBUGGER_EVALUATEONCALLFRAME, params: EvaluateOnCallFrameParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/debugger/EvaluateOnCallFrameReturnType>(source)

Evaluates expression on a given call frame.


fun postAsync(method: SessionMethod.DEBUGGER_SETVARIABLEVALUE, params: SetVariableValueParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.DEBUGGER_SETRETURNVALUE, params: SetReturnValueParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.DEBUGGER_SETASYNCCALLSTACKDEPTH, params: SetAsyncCallStackDepthParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Enables or disables async call stacks tracking.


fun postAsync(method: SessionMethod.DEBUGGER_SETBLACKBOXPATTERNS, params: SetBlackboxPatternsParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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.


fun postAsync(method: SessionMethod.DEBUGGER_SETBLACKBOXEDRANGES, params: SetBlackboxedRangesParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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.


fun postAsync(method: SessionMethod.CONSOLE_ENABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.CONSOLE_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.CONSOLE_CLEARMESSAGES): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Does nothing.


fun postAsync(method: SessionMethod.PROFILER_SETSAMPLINGINTERVAL, params: SetSamplingIntervalParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.PROFILER_STARTPRECISECOVERAGE, params: StartPreciseCoverageParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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.


fun postAsync(method: SessionMethod.PROFILER_STOPPRECISECOVERAGE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.PROFILER_TAKEPRECISECOVERAGE): ERROR CLASS: Symbol not found for Promise<node/inspector/profiler/TakePreciseCoverageReturnType>(source)

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


fun postAsync(method: SessionMethod.PROFILER_GETBESTEFFORTCOVERAGE): ERROR CLASS: Symbol not found for Promise<node/inspector/profiler/GetBestEffortCoverageReturnType>(source)

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


fun postAsync(method: SessionMethod.HEAPPROFILER_ADDINSPECTEDHEAPOBJECT, params: AddInspectedHeapObjectParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Enables console to refer to the node with given id via

$x (see Command Line API for more details $

x functions).


fun postAsync(method: SessionMethod.NODETRACING_GETCATEGORIES): ERROR CLASS: Symbol not found for Promise<node/inspector/nodeTracing/GetCategoriesReturnType>(source)

Gets supported tracing categories.


fun postAsync(method: SessionMethod.NODETRACING_START, params: StartParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Start trace events collection.


fun postAsync(method: SessionMethod.NODETRACING_STOP): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.NODEWORKER_SENDMESSAGETOWORKER, params: SendMessageToWorkerParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Sends protocol message over session with given id.


fun postAsync(method: SessionMethod.NODEWORKER_ENABLE, params: EnableParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.NODEWORKER_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.NODEWORKER_DETACH, params: DetachParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Detached from the worker with given sessionId.


fun postAsync(method: SessionMethod.NETWORK_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.NETWORK_ENABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

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


fun postAsync(method: SessionMethod.NETWORK_GETREQUESTPOSTDATA, params: GetRequestPostDataParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/network/GetRequestPostDataReturnType>(source)

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


fun postAsync(method: SessionMethod.NETWORK_GETRESPONSEBODY, params: GetResponseBodyParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/network/GetResponseBodyReturnType>(source)

Returns content served for the given request.


fun postAsync(method: SessionMethod.NETWORK_STREAMRESOURCECONTENT, params: StreamResourceContentParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<node/inspector/network/StreamResourceContentReturnType>(source)

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


fun postAsync(method: SessionMethod.NODERUNTIME_ENABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Enable the NodeRuntime events except by NodeRuntime.waitingForDisconnect.


fun postAsync(method: SessionMethod.NODERUNTIME_DISABLE): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Disable NodeRuntime events


fun postAsync(method: SessionMethod.NODERUNTIME_NOTIFYWHENWAITINGFORDISCONNECT, params: NotifyWhenWaitingForDisconnectParameterType = definedExternally): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>(source)

Enable the NodeRuntime.waitingForDisconnect.