question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: cppdbg is not supported

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Firefox
  • Local OS: Win11
  • Remote OS: RHEL 9
  • Remote Architecture: x86_64
  • code-server --version: 4.5.2 35372d3832521d25327e11c9776096730df22ecb with Code 1.68.1

Receiving the following message when trying to debug: image

My tasks.json is as follows:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Makefile_Debug",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "build",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "COMPILATION_MODE=Debug",
                "C_COMPILER=${config:C_Cpp_Config.cCompilerPath}",
                "LANGUAGE_MODE=C",
                "EXECUTABLE_NAME=${fileBasenameNoExtension}Debug"
            ],
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Makefile_Release",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "build",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "COMPILATION_MODE=Release",
                "C_COMPILER=${config:C_Cpp_Config.cCompilerPath}",
                "LANGUAGE_MODE=C",
                "EXECUTABLE_NAME=${fileBasenameNoExtension}Release"
            ],
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "C: Debug (Single File)",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "build_single",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "FILE_NAME=${file}",
                "COMPILATION_MODE=Debug",
                "C_COMPILER=${config:C_Cpp_Config.cCompilerPath}",
                "LANGUAGE_MODE=C",
                "EXECUTABLE_NAME=${fileBasenameNoExtension}Debug"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "C: Release (Single File)",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "build_single",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "FILE_NAME=${file}",
                "COMPILATION_MODE=Release",
                "C_COMPILER=${config:C_Cpp_Config.cCompilerPath}",
                "LANGUAGE_MODE=C",
                "EXECUTABLE_NAME=${fileBasenameNoExtension}Release"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "C: Debug (Folder)",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "clean",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/"
            ],
            "dependsOn": [
                "Makefile_Debug"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "C: Release (Folder)",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "clean",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/"
            ],
            "dependsOn": [
                "Makefile_Release"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Execute: Debug Program",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "execute",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "--quiet",
                "EXECUTABLE_NAME=${fileBasenameNoExtension}Debug"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Execute: Release Program",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "execute",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "--quiet",
                "EXECUTABLE_NAME=${fileBasenameNoExtension}Release"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Makefile Clean",
            "type": "shell",
            "command": [
                "${config:C_Cpp_Config.makePath}"
            ],
            "args": [
                "clean",
                "--file=${workspaceFolder}/.vscode/Makefile",
                "--directory=${fileDirname}/",
                "--quiet"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        }
    ]
}

Steps to Reproduce

  1. open code-server
  2. install extensions: C++ Config, C++ Runner, Clangd
  3. Attempt to ‘run and debug’ a test file
  4. Error is thrown as shown

Expected

My files should compile.

Actual

My files do not compile.

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

I am not actually using HTTPS, as I am using the port-forwarded method described in the docs. https://coder.com/docs/code-server/latest/guide#port-forwarding-via-ssh

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SirMooncakecommented, Sep 9, 2022

I think for ‘cppdbg’ to work you need the ms-vscode.cpptools extension, which can’t be installed because it’s only available in the ms marketplace. Maybe there is an other way to make it work, but for the moment the workaround would be to install the extension manually.

0reactions
jialuohucommented, Nov 2, 2022

As @SirMooncake said, we need to install the extension manually. Here is the link for ms-vscode.cpptools extension file: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools&ssr=false#version-history Download and upload to your server. Then Run code-server --install-extension <path to vsix> in the terminal. Done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configured debug type 'cppdbg' is not supported. #139 - GitHub
I get this error when I do not have the proprietary C++ extension installed. I looked and the relevant files are cmake.js and...
Read more >
Unable to setup C++ debugging in VSCode; Debug type not ...
I use docker container for development and I needed to install this extension after attaching to my docker container.
Read more >
Configured debugger type 'cppdbg' is not supported : r/vscode
Hi All, I've just upgraded my OS Linux lubuntu 18 to lubuntu 20. Now when I try to debug any software I get...
Read more >
Configure launch.json for C/C++ debugging in Visual Studio ...
Set this to the path to the core dump file to start debugging in the launch configuration. Note: core dump debugging is not...
Read more >
Unable to Run programme. Problem in launch.json - Ask
I am very new to VS Code and debug env. Tried launching game to window following game example only for “cppdbg” not supported...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found