调试ava测试时,WebStorm不会在断点处停止

时间:2017-08-03 20:41:18

标签: node.js unit-testing debugging webstorm ava

我已经创建了一个npm配置,用于在ava recipe here之后在WebStorm(版本2017.2)中调试我的ava测试。当我点击调试按钮时,所有测试都在运行,但它似乎没有在任何断点处停止。我也看到了很多这些:

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

这是我的npm调试配置: enter image description here

这是package.json中的ava配置:

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

任何想法如何使这项工作?

2 个答案:

答案 0 :(得分:1)

从@melis 的答案中添加参数后,这里是我正在使用的设置:

screenshot of RubyMine

答案 1 :(得分:0)

好的,我明白了。 什么食谱没有说,你仍然需要通过传递#include "layout.h" #include <QtWidgets/QApplication> #include <QtWidgets/QPushButton> #include <QtWidgets/QHBoxLayout> int main(int argc, char *argv[]) { QApplication a(argc, argv); layout w; QHBoxLayout hb; QPushButton b("button 0"); QPushButton b1("button 1"); hb.addWidget(&b); hb.addWidget(&b1); w.setLayout(&hb); w.show(); return a.exec(); } 来启用Node.js的检查器代理。我把它放在那里,现在调试器在断点处停止,我可以照常调试。