在调试模式下运行 oclif 项目测试的 launch.json 是什么样的?我似乎无法得到它,所以我设置了断点并介入。
问问题
214 次
2 回答
0
我从这里提供的回复中受益: https ://github.com/oclif/oclif/issues/135#issuecomment-403622999
我已经用打字稿对其进行了测试,并且program
非常适合调试。
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/bin/run",
"args": [
"--name",
"Callum",
"--force",
"argument"
]
}
]
}
于 2020-12-09T02:05:46.173 回答
0
This launch.json config works for me:
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"runtimeExecutable": "${workspaceFolder}/node_modules/ts-mocha/bin/ts-mocha",
"args": [
"${workspaceFolder}/test/**/*.ts"
],
"protocol": "inspector"
},
于 2020-10-08T18:53:00.717 回答