-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
inspector: make debug an alias for inspect
#11441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed because inspect behaviour is different from debug. The former stops before reaching the repl. This test doesn't make sense anymore.
debug and alias for inspectdebug an alias for inspect
deps/node-inspect/lib/_inspect.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is to support node --{inspect,debug}-port=1234 {inspect,debug} my-script.js etc.? If so, I'd rather make that explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like this? nodejs/node-inspect#26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
joshgav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary: I think we should wait to alias debug till Node integrates V8 5.8+, and not at the start of Node 8, assuming Node 8 uses V8 5.7. This provides more notification time for those depending on the legacy interface.
Also, there's a lot of code here unrelated to aliasing debug. Could that be separated into another PR? It would make review easier. Thanks!
src/node_debug_options.cc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--debug is the primary way to activate the legacy debugger interface. Aliasing it to --inspect instead would make it impossible to start that interface. That would break tools which still depend on it.
I think we should keep --debug associated with the legacy debugger as long as possible, i.e. till we update to V8 5.8+.
lib/internal/bootstrap_node.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per my previous comment, I think we should not yet alias --debug to --inspect. The reason for not yet aliasing --debug doesn't apply to node debug, but for consistency's sake, we should probably not yet alias node debug to node inspect either.
|
test/parallel/test-debug-usage.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to future self: This test will need to be updated once we pull in @addaleax's usage text fix. https://github.com/nodejs/node-inspect/pull/20/files
|
👍 to "cherry-picking" that change (I'll try to do another dependency pull soon so the two code bases don't drift apart too much). |
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo comment.
test/parallel/test-debug-brk.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're leaving behind dead code with this change. Remove stdoutPattern and outputMatched from test(). There may be more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
I'm afraid this needs a rebase. Seems some conflicting changes were landed today. |
node debugis now an alias ofnode inspect. This is intended to be a minimal change – it doesnot get rid of the old debugger code. That can be done in a follow-on.
This commit has a circular dependency on Take --debug-port into account node-inspect#26. I propose that we land here, and then later land upstream.test-debugger-pid.jsdisabled because it depends on ability to debug apid in node-inspect. Once upstream adds this capability, we can enable
the test back again.
/cc @nodejs/diagnostics @eugeneo @jkrems