调试适配器进程意外终止(读取ECONNRESET)

时间:2019-03-01 11:20:03

标签: c++ linux visual-studio-code vscode-debugger

当我尝试调试程序时(在c ++中为简单的hello世界),调试器在控制台中写入vscode(LINUX os)(已下载并安装扩展名c / c ++)中的代码:

“调试适配器进程意外终止(读取ECONNRESET)”

如何从此问题中“治愈”调试器?& main.cpp

#include<iostream> 
int main(){           
std::cout<<"Hello,world!"<<std::endl;
}

launch.json

{
"version": "0.2.0",
"configurations": [
    {
        "name": "C++ Debug (gdb)",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceFolder}/bin/main",
        "preLaunchTask": "Build C++ project",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": true,
        "MIMode": "gdb",
        "miDebuggerPath": "/usr/bin/gdb",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ]
    }
]} 

tasks.json

{
"version": "2.0.0",
"tasks": [
    {
        "label": "Build C++ project",
        "type": "shell",
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "command": "make",
    },
    {
        "label": "Build & run C++ project",
        "type": "shell",
        "group": {
            "kind": "test",
            "isDefault": true
        },
        "command": "make",
        "args": [
            "run"
        ]
    }
]}

BTW程序编译正常,并且在控制台中出现Hello,world

0 个答案:

没有答案