As of #2316, the upcoming v3 release has a built-in debug command. I've updated two of the existing debugging recipes but I'm not a WebStorm user, so this recipe still needs updating: https://github.com/avajs/ava/blob/master/docs/recipes/debugging-with-webstorm.md
@novemberborn Hi!
Is this issue related https://github.com/avajs/ava/issues/1787 ?
I have been failing debugger after upgraded ava to version 3.
But I found how to do debug on WebStorm.
I using
You will be able to do debug mode by this capture.

I didn't use npm Configuration but Node.js Configuration.
You do not need to debug mode on ava. Only specify path to test file and click debug button.
ATTENTION:
@erikkemperman said this at https://github.com/avajs/ava/issues/1787. I think so too.
JetBrains are now doing some internal cleverness around debug ports
Is this issue related #1787 ?
No, that issue predates AVA 3.
- WebStorm will run 2 Debugger Listener (I don't know that reason...)
AVA runs your test file in a child process. You don't need to debug AVA itself.
- ava have been killed process 10 seconds from v3. Because I didn't run ava's debug mode
Yup. Ideally we can make this work using ava debug.
I've made this plugin.
It also has the timeout issue though, not sure how to fix that.
It also has the timeout issue though, not sure how to fix that.
You'd have to set it to a high value, perhaps using the CLI, eg --timeout=1h.
The approach for VSCode is to configure the port, combined with --break which is somehow needed as well.
Would that work for WebStorm?
@novemberborn Not sure how to fix that in the plugin. I don't do debugging, I let IntelliJ (and friends) handle that. I create a generic nodejs run configuration, and this supports both run and debug out of the box. Perhaps I can specify additional flags when run in debug, need to look that up.
This configuration works perfectly for me using Webstorm 2020.1.
For anyone coming across this issue having trouble using this configuration to debug typescript files, you need to add "sourceMap": true to your tsconfig.json file.
I also want to add that you can set up Webstorm to compile typescript whenever this configuration is run, by adding it as an entry in the "Before launch" section.

@chdefrene would you be interested in doing a PR to add this to the recipe?
hi. since AVA 3 we also have issues with debugging tests with Intellij IDEA - configuration should be similar to that for webstorm but above fix did not help because error is different:
Starting inspector on 127.0.0.1:54264 failed: address already in use
tried to apply the solution used in VisualStudio Code, setting port but with no success. any hints?
This PR may contain a clue as to what needs updating: https://github.com/avajs/ava/pull/2571