microsoft / microsoft/vscode-cpptools

Cannot launch gdb debugging session by remote-ssh

Open
#6,675 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Debugger

Describe the bug

  • OS and Version:
    • host: macos
    • remote: ubuntu18.04
  • VS Code Version:1.52.0
  • C/C++ Extension Version:1.1.3
  • Other extensions you installed (and if the issue persists after disabling them):
    • host:Remote-SSH
    • remote: CMake tools, python
  • A clear and concise description of what the bug is.
    I worked on a mac and developed on a remote Linux server by remote-ssh. Nonw I can compile projects and debug them on the command line with GDB. But when I start the debugger, a blue loading bar appears under the arrow and nothing happens. I've added logging to launch.json, but output window only print "Launch configuration" and debug console print nothing.

Additional context
launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",

            "program":"cartoonDemo.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/build",
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "logging": {
                "trace": true,
                "traceResponse": true,
                "engineLogging": true
            },
        }
    ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the launch.json configuration and reproduce the debugging session through Remote-SSH, comparing it with the command-line GDB session on the remote Ubuntu host. Review the trace, traceResponse, and engineLogging output; done means the configured program launches and produces debugger output instead of remaining on the loading bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.