[英]how do you launch oclif tests with debugging using vscode?
在調試模式下運行 oclif 項目測試的 launch.json 是什么樣的? 我似乎無法理解,所以我設置了斷點並介入。
這個 launch.json 配置對我有用:
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"runtimeExecutable": "${workspaceFolder}/node_modules/ts-mocha/bin/ts-mocha",
"args": [
"${workspaceFolder}/test/**/*.ts"
],
"protocol": "inspector"
},
我從這里提供的回復中受益: 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"
]
}
]
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.