我正在使用Visual Studio Code构建cucumberjs测试.我能够从命令行使用npm运行测试,并且我能够使用启动配置在VS Code中运行它们.
但是,我无法从Visual Studio代码中调试测试.这是在Windows 7上,VSCode 1.12.1
基本文件结构:
.
+-- .vscode
| +-- launch.json
+-- features
| +-- step_definitions
| | +-- sampleSteps.js
| +-- support
| | +-- customWorld.js
| +-- sampletest.feature
+-- node_modules
| +-- .bin
| | +-- cucumberjs
+-- package.json
+-- README.md
Run Code Online (Sandbox Code Playgroud)
在package.json里面,我有以下内容:
"scripts": {
"test": "./node_modules/.bin/cucumberjs"
},
Run Code Online (Sandbox Code Playgroud)
从命令行,我可以运行npm test或npm run-script test成功.我有一个launch.json配置如下:
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes. …Run Code Online (Sandbox Code Playgroud)