MCPcopy Create free account
hub / github.com/nodejs/node / setupInspectorHooks

Function setupInspectorHooks

lib/internal/process/pre_execution.js:543–556  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

541}
542
543function setupInspectorHooks() {
544 // If Debugger.setAsyncCallStackDepth is sent during bootstrap,
545 // we cannot immediately call into JS to enable the hooks, which could
546 // interrupt the JS execution of bootstrap. So instead we save the
547 // notification in the inspector agent if it's sent in the middle of
548 // bootstrap, and process the notification later here.
549 if (internalBinding('config').hasInspector) {
550 const {
551 enable,
552 disable,
553 } = require('internal/inspector_async_hook');
554 internalBinding('inspector').registerAsyncHook(enable, disable);
555 }
556}
557
558function setupNetworkInspection() {
559 if (internalBinding('config').hasInspector && getOptionValue('--experimental-network-inspection')) {

Callers 1

prepareExecutionFunction · 0.85

Calls 2

registerAsyncHookMethod · 0.80
requireFunction · 0.50

Tested by

no test coverage detected