-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update debugging with webstorm recipe #1483
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
Update debugging with Webstorm recipe to include Node options flag --inspect-brk.
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.
Thanks @melisoner2006!
Would this work with --inspect
as well, rather than --inspect-brk
?
@@ -13,6 +13,8 @@ In the `JavaScript file` field specify the path to AVA in the project's `node_mo | |||
|
|||
In the `Application parameters` pass the CLI flags you're using and the test files you would like to debug, for example `--verbose test.js`. | |||
|
|||
In the `Node parameters` pass the `--inspect-brk` flag to enable the Node inspector or `--inspect-brk=port` if you want to listen it on a specific port. |
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.
Need to move "it" around:
if you want it to listen on a specific port.
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.
@melisoner2006 Please add note that --inspect-brk
works only in the node 7+.
Not all users uses latest 8 :)
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.
Probably will be better if text if you want to listen
will be in the start of sentence, because it is advanced and optional instruction (english is not my native language, so, I don't known how much it is relevant).
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.
@novemberborn --inspect
does work for me, but there's risk of using it. --inspect-brk
stops before the user's script starts. --inspect
flag doesn't guarantee that: if there are breakpoints early in the entry point they might be skipped until the debugger is attached. At least, this is my understanding.
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.
@develar Thanks for pointing out the node version. I updated my statement to include a solution for both 7+ and previous versions.
I also removed the statement about --inspect-brk=port
. There are other flags that can also be used and I thought this recipe is not the place to explain all node debugger flags.
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.
Looks good to me. That's for updating the recipe.
Thank you @melisoner2006! |
Update debugging with Webstorm recipe to include Node options flag --inspect-brk.
Update debugging with Webstorm recipe to include Node options flag --inspect-brk.