Skip to content

CPP Debug not work #70

Closed
Closed
@wwbmmm

Description

@wwbmmm
  • code-server version: code-server v1.0.0
  • OS Version: Ubuntu 18.10
  • Extension: ms-vscode.cpptools

Steps to Reproduce

  1. install ms-vscode.cpptools extension
  2. write a cpp file, eg. a.cpp, and compile as target a.out
  3. edit .vscode/launch.json, add debug configuration:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "mydebug",
            "type": "cppdbg",
            "request": "launch",
            "program": "/path-to-out/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": ".",
            "externalConsole": true,
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "miDebuggerPath": "/path-to-gdb/bin/gdb",
            "logging": {
                "engineLogging": true,
                "trace": true,
                "traceResponse": true
            },
            "linux": {
                "MIMode": "gdb"
            },
            "osx": {
                "MIMode": "gdb"
            },
            "windows": {
                "MIMode": "gdb"
            }
        } 
    ]
}
  1. launch debug, and it will be blocked

output in Debug Console:

1: (333) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-aql0olr8.7a7 ; cd /Users/wangweibing/dev/demo/bc_out/baidu/bcloud-demo/hello-git/output/bin ; DbgTerm=`tty` ; set -o monitor ; trap 'rm /tmp/Microsoft-MIEngine-In-v0g5v6cv.yd2 /tmp/Microsoft-MIEngine-Out-eprffizq.g0y /tmp/Microsoft-MIEngine-Pid-aql0olr8.7a7 /tmp/Microsoft-MIEngine-Cmd-kbqexxnx.681' EXIT ; /opt/compiler/gcc-4.8.2/bin/gdb --interpreter=mi --tty=$DbgTerm < /tmp/Microsoft-MIEngine-In-v0g5v6cv.yd2 > /tmp/Microsoft-MIEngine-Out-eprffizq.g0y & clear; pid=$! ; echo $pid > /tmp/Microsoft-MIEngine-Pid-aql0olr8.7a7 ; wait $pid; 
--> C (runInTerminal-30): {"command":"runInTerminal","arguments":{"kind":"external","title":"cppdbg: child","cwd":"","args":["sh","/tmp/Microsoft-MIEngine-Cmd-kbqexxnx.681"],"env":{}},"seq":30,"type":"request"}
--> E (output): {"event":"output","body":{"category":"console","output":"1: (347) Wait for connection completion.\n"},"seq":32,"type":"event"}
1: (347) Wait for connection completion.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions