Jestjs VS代码调试器变量未显示
我正在尝试用vscode调试测试。 开玩笑就是跑步。 这是我的启动配置Jestjs VS代码调试器变量未显示,jestjs,vscode-settings,Jestjs,Vscode Settings,我正在尝试用vscode调试测试。 开玩笑就是跑步。 这是我的启动配置 { "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Jest All", "program": "${workspaceFolder}/node_modules/jest/bin/jest",
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true }
]
}
当我启动调试器时,它会在断点处停止,但本地变量窗格中没有显示任何变量。
试试这个(如果你在windows上):
尝试此操作(如果您在windows上):
添加成功了。谢谢。我可以问一下是“windows”吗:{这就是诀窍吗?老实说,我不太注意那些配置文件,我只是不断尝试,直到他们成功为止。添加成功了。谢谢。我可以问一下是“windows”吗:{这就是诀窍吗?老实说,我不太注意那些配置文件,我只是不断尝试,直到它们起作用,哈哈
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"jest.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
}
]
}