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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/recipes/debugging-with-webstorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Save the configuration.

## Setup using npm
Expand Down Expand Up @@ -42,7 +44,7 @@ Use the following configuration parameters:

Your IDE will then execute `npm run test` and thus call `node_modules/.bin/ava` and the AVA-configuration you have specified in your package.json.

Don't forget to select a Node.js interpreter.
Don't forget to select a Node.js interpreter and to pass the `--inspect-brk` flag in the `Node parameter`.

Save the configuration.

Expand Down