Skip to content

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

Merged
merged 2 commits into from
Aug 9, 2017

Conversation

melisoner2006
Copy link
Contributor

Update debugging with Webstorm recipe to include Node options flag --inspect-brk.

Update debugging with Webstorm recipe to include Node options flag --inspect-brk.
Copy link
Member

@novemberborn novemberborn left a 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?

@prigara @develar would you mind taking a look at this?

@@ -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.
Copy link
Member

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.

Copy link
Contributor

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 :)

Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor Author

@melisoner2006 melisoner2006 Aug 6, 2017

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.

Copy link
Contributor

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.

@novemberborn novemberborn merged commit d8c21a6 into avajs:master Aug 9, 2017
@novemberborn
Copy link
Member

Thank you @melisoner2006!

Also thank you @prigara and @develar for your feedback.

kevva pushed a commit that referenced this pull request Sep 13, 2017
Update debugging with Webstorm recipe to include Node options flag --inspect-brk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants