0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/main/inspect.js
Joyee Cheung f9b76c3bf4
process: call prepareMainThreadExecution in node inspect
Since we should treat the node-inspect as third-party
user code.

PR-URL: https://github.com/nodejs/node/pull/26466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-08 13:53:48 +01:00

23 lines
491 B
JavaScript

'use strict';
// `node inspect ...` or `node debug ...`
const {
prepareMainThreadExecution
} = require('internal/bootstrap/pre_execution');
prepareMainThreadExecution();
if (process.argv[1] === 'debug') {
process.emitWarning(
'`node debug` is deprecated. Please use `node inspect` instead.',
'DeprecationWarning', 'DEP0068');
}
markBootstrapComplete();
// Start the debugger agent.
process.nextTick(() => {
require('internal/deps/node-inspect/lib/_inspect').start();
});