Skip to content

Commit c832f17

Browse files
committed
lib: build node inspect into node
Include the relevant files from `deps/node-inspect` in the compiled `node` binary and make `node inspect` work like `node-inspect`. PR-URL: #10187 Reviewed-By: James M Snell <[email protected]>
1 parent 3140a69 commit c832f17

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/internal/bootstrap_node.js

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
// Start the debugger agent
7777
NativeModule.require('_debugger').start();
7878

79+
} else if (process.argv[1] === 'inspect') {
80+
// Start the debugger agent
81+
NativeModule.require('node-inspect/lib/_inspect').start();
82+
7983
} else if (process.argv[1] === '--remote_debugging_server') {
8084
// Start the debugging server
8185
NativeModule.require('internal/inspector/remote_debugging_server');

node.gyp

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@
113113
'deps/v8/tools/tickprocessor.js',
114114
'deps/v8/tools/SourceMap.js',
115115
'deps/v8/tools/tickprocessor-driver.js',
116+
'deps/node-inspect/lib/_inspect.js',
117+
'deps/node-inspect/lib/internal/inspect_client.js',
118+
'deps/node-inspect/lib/internal/inspect_repl.js',
116119
],
117120
'conditions': [
118121
[ 'node_shared=="true"', {

0 commit comments

Comments
 (0)