From 03dba720da6eb70b360feb4a224e7daa0ef70577 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 6 Mar 2019 12:02:04 +0100 Subject: [PATCH] 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 Reviewed-By: Ruben Bridgewater --- lib/internal/main/inspect.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/internal/main/inspect.js b/lib/internal/main/inspect.js index 7376f8984b13e1..f6777fe852bcfc 100644 --- a/lib/internal/main/inspect.js +++ b/lib/internal/main/inspect.js @@ -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.',