Skip to content

Commit

Permalink
lib: build node inspect into node
Browse files Browse the repository at this point in the history
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 <jasnell@gmail.com>
  • Loading branch information
addaleax committed Feb 13, 2017
1 parent 3140a69 commit c832f17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/internal/bootstrap_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
// Start the debugger agent
NativeModule.require('_debugger').start();

} else if (process.argv[1] === 'inspect') {
// Start the debugger agent
NativeModule.require('node-inspect/lib/_inspect').start();

} else if (process.argv[1] === '--remote_debugging_server') {
// Start the debugging server
NativeModule.require('internal/inspector/remote_debugging_server');
Expand Down
3 changes: 3 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
'deps/v8/tools/tickprocessor.js',
'deps/v8/tools/SourceMap.js',
'deps/v8/tools/tickprocessor-driver.js',
'deps/node-inspect/lib/_inspect.js',
'deps/node-inspect/lib/internal/inspect_client.js',
'deps/node-inspect/lib/internal/inspect_repl.js',
],
'conditions': [
[ 'node_shared=="true"', {
Expand Down

0 comments on commit c832f17

Please sign in to comment.