Skip to content

Conversation

@sampart
Copy link
Contributor

@sampart sampart commented Jul 14, 2020

https://github.com/avajs/ava/blob/master/docs/recipes/debugging-with-vscode.md recommends passing the debug option to Ava. However, in my experience Ava waits indefinitely when this option is used, without actually running any tests.

The increased timeout setting is so that tests won't fail prematurely because you're slowly stepping through code.

Merge / deployment checklist

  • N/A Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.

https://github.com/avajs/ava/blob/master/docs/recipes/debugging-with-vscode.md recommends passing the `debug` option to Ava.  However, in my experience Ava waits indefinitely when this option is used, without actually running any tests.

The increased timeout setting is so that tests won't fail prematurely because you're slowly stepping through code.
Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce ava hanging when --debug is passed. It seems to work for me when I add that to package.json or to launch.json. Anyway, what's in this PR also work fine for me. Thanks for working out how to do this.

@sampart
Copy link
Contributor Author

sampart commented Jul 14, 2020

The --debug option doesn't cause hanging for me either (although the extended timeout is still needed), but passing debug without dashes (as recommended in the article I linked to) to invoke ava like ava debug does. But, as you say, this works, so let's go with it for now and we can always revise it. Thanks

@sampart sampart merged commit d1d8076 into main Jul 14, 2020
@sampart sampart deleted the vscode-debugging branch July 14, 2020 09:32
@github-actions github-actions bot mentioned this pull request Jul 20, 2020
@github-actions github-actions bot mentioned this pull request Jul 27, 2020
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.

3 participants