我想在vscode上通过bashdb调试bash shell,但似乎需要设置launch.json。
我该怎么做呢。
似乎编辑了scriptPath ...?
答案 0 :(得分:0)
在IDE
${command.AskForScriptName}
中使用${file}
替换launch.json
来运行/调试当前打开的脚本:
{
"version": "0.2.0",
"configurations": [
{
"name": "Bash-Debug (type in script name)",
"type": "bashdb",
"request": "launch",
"scriptPath": "${file}",
"commandLineArguments": "",
"windows": {
"bashPath": "C:\\Windows\\sysnative\\bash.exe"
},
"linux": {
"bashPath": "bash"
},
"osx": {
"bashPath": "bash"
}
}
]
}
您也可以对特定文件进行硬编码:
<强> Linux的:强>
"scriptPath": "${workspaceRoot}/test.sh"
<强>窗:强>
"scriptPath": "${workspaceRoot}\\test.sh"