From 486ac23cb0fc27c8abc243b55a6875d28506966b Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sun, 6 May 2018 23:53:33 +0200 Subject: [PATCH] lib: only load inspector stuff if necessary PR-URL: https://github.com/nodejs/node/pull/20567 Reviewed-By: Gus Caplan Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- lib/internal/bootstrap/node.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index f9bed03d269fb2..1aca1ea2374748 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -64,7 +64,10 @@ NativeModule.require('internal/process/write-coverage').setup(); NativeModule.require('internal/trace_events_async_hooks').setup(); - NativeModule.require('internal/inspector_async_hook').setup(); + + if (process.config.variables.v8_enable_inspector) { + NativeModule.require('internal/inspector_async_hook').setup(); + } _process.setupChannel(); _process.setupRawDebug();