-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
inspector: restore --debug-brk alias #12580
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,15 +97,13 @@ bool DebugOptions::ParseOption(const std::string& option) { | |
if (option_name == "--inspect") { | ||
debugger_enabled_ = true; | ||
enable_inspector = true; | ||
} else if (option_name == "--inspect-brk") { | ||
} else if (option_name == "--inspect-brk" || option_name == "--debug-brk") { | ||
debugger_enabled_ = true; | ||
enable_inspector = true; | ||
wait_connect_ = true; | ||
} else if ((option_name != "--debug-port" && | ||
option_name != "--inspect-port") || | ||
!has_argument) { | ||
// only other valid possibility is --inspect-port, | ||
// which requires an argument | ||
} else if (option_name == "--inspect-port" || option_name == "--debug-port") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What should happen if both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd agree its a bit weird that literally every debug option can be followed with an optional For example, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally, I would rather There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, but making currently allowed syntax invalid is not related to the problem this PR addresses (and would be semver-major). |
||
if (!has_argument) return false; | ||
} else { | ||
return false; | ||
} | ||
|
||
|
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.
Can we make sure that
--debug-brk
without--inspect
still fails?