-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix debugging with Webstorm on Node.js 8 #1414
Conversation
add `--inspect-brk` for Webstorm debugging
Hey @dohomi, this looks good! I pushed a commit which replaces these comparisons with a regular expression instead. That led me to trying to understand the existing API tests which seem to be limited and a bit confusing (notably Could you check whether @sindresorhus happy with the regexes? |
👍 |
@novemberborn yes I think this is better a approach 👍 |
execArgv.some((arg, index) => { | ||
const isDebugArg = arg === '--inspect' || arg.indexOf('--inspect=') === 0; | ||
const isDebugArg = /^--inspect(-brk)?($|=)/.test(arg); |
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.
There's no --inspect-brk
. Could you update t=your regex removing that validation, please?
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.
It's there in Node.js 8: https://nodejs.org/api/debugger.html#debugger_v8_inspector_integration_for_node_js
Thanks @dohomi! |
Thanks for merging |
* Rename confusing `--debug-brk` in code comment * Document curious test behavior around `--inspect` and `--debug` flags * Match `--debug` and `--inspect` args with regular expressions * Add `--inspect-brk` for Webstorm debugging
Description
On Node 8 Webstorm debug is not working any longer. The reason is, that the
--inspect-brk
is not handled correctly inside of the cli.js fileError Message & Stack Trace
Fix
Adding --inspect-brk to api.js
Environment
Node v8.1, latest AVAJS