我正在使用Visual Studio Code进行编程,在配置launch.json时遇到了一些麻烦。
我的默认Shell设置为settings.json中的“ terminal.integrated.shell.windows”:“ C:\ Windows \ System32 \ wsl.exe”
我想将其覆盖到launch.json中的powershell或cmd进行调试。有什么办法吗?
我已经设法按需覆盖我的task.json,但是我找不到在launch.json中覆盖默认shell的方法。
人们已经对launch.json的文档进行了很多搜索,但是似乎没有太多。
launch.json
Open High Low Close Open_count
0 0.001268 0.001277 0.001266 0.001271 2
1 0.001268 0.001269 0.001265 0.001266 2
2 0.001265 0.001265 0.001242 0.001254 1
3 0.001253 0.001271 0.001244 0.001251 2
4 0.001253 0.001259 0.001249 0.001257 2
5 0.001257 0.001260 0.001241 0.001248 1
tasks.json
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/test.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Apps\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
就像我在task.json中一样,只想切换到launch.json中的另一个shell:
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "c:\\windows\\system32\\cmd.exe",
}
}
},
"tasks": [
{
"label": "Compile with MinGW-w64",
"type": "shell",
"command": "g++.exe",
"args": [
"-g",
"-o",
"test.exe",
"test.cpp"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}