【发布时间】:2019-03-28 16:45:47
【问题描述】:
我正在尝试在 Jest Debug for VS Code 中设置断点。
此启动配置运行但未命中断点:
{
"type": "node",
"request": "launch",
"name": "Test",
"runtimeExecutable": "npm",
"runtimeArgs": ["test"],
"port": 9229
}
此启动配置未运行,但它看起来像遇到断点。
它在调试器断点处打开 fs.js 并出现此错误:
错误:ENOENT:没有这样的文件或目录,访问 'node_modules/jest-cli/bin/package.json'
就像它在 jest bin 目录中寻找工作区的 package.json 文件一样。
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
【问题讨论】:
标签: npm visual-studio-code jestjs gatsby