melis
melis

Reputation: 1275

WebStorm doesn't stop at breakpoint when debugging ava tests

I have created an npm configuration to debug my ava tests in WebStorm (version 2017.2) following this ava recipe here. When I hit the debug button all tests are being ran but it doesn't seem to stop at any of the breakpoints. I also see bunch of these:

[?25l 
 ⠋ [?25l 
 ⠙ [?25l 
 ⠹  
 ⠸ [?25l[?25l 
 ⠼ [?25l 
 ⠴ [?25l 

This is my npm debug configuration: enter image description here

And this is the ava configuration in package.json:

 "scripts": {
    "start": "nodemon app.js",
    "test": "ava",
  },
  "ava": {
    "files": [
      "test/lib/**/*.js"
    ],
    "source": [
      "app.js",
      "lib/**/*.js"
    ]
  },

Any ideas how to make this work?

Upvotes: 1

Views: 745

Answers (2)

Justin Tanner
Justin Tanner

Reputation: 14372

After adding the argument from @melis's answer here is the setup I'm using:

screenshot of RubyMine

Upvotes: 1

melis
melis

Reputation: 1275

Ok, I got it. What recipe doesn't say is, you still need to enable the inspector agent of Node.js by passing --inspect-brk. I put it there and now debugger stops at breakpoints and I can debug as usual.

Upvotes: 1

Related Questions