繁体   English   中英

C 的 VSCode 内部端子不接受任何输入

[英]VSCode internal terminal for C not taking any input

我在 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"
        }
    ]
}

请帮助我真的不知道该怎么办。

我只是重新安装了VSCode,删除了tasks.json和launch.json,将整个工作区(仅C文件)移动到另一个位置,再次打开文件夹并工作!
这种方法我试过一次,虽然一开始没用!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM