【发布时间】:2021-04-03 00:18:21
【问题描述】:
我在 ubuntu 18.04 上工作,预装了 gcc,VSCode 作为默认编辑器,我可以轻松地构建和调试我的代码,直到昨晚我突然意识到我的终端(VSCode 中的内部终端)不接受任何输入。 我从一个朋友那里得到了 launch.json 和 tasks.json 文件,他的 VSCode 运行良好,但不幸的是没有任何区别
This is My launch.json file
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
And Here's the tasks.json file:
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc build active file",
"command": "/usr/bin/gcc",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind" : "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/gcc"
}
]
}
请帮忙,我真的不知道该怎么办。
【问题讨论】:
标签: c linux gcc visual-studio-code terminal