process: call prepareMainThreadExecution in node inspect

Since we should treat the node-inspect as third-party
user code.

Backport-PR-URL: https://github.com/nodejs/node/pull/26662
PR-URL: https://github.com/nodejs/node/pull/26466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Joyee Cheung authored and Michaël Zasso committed 2019-03-27 20:30:13 +01:00
1 parent df55731918
commit 03dba720da
1 file changed
+6
+6
View File
@@ -2,6 +2,12 @@
// `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.',