microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.51k stars 1.55k forks source link

Error launching debugger in vscode #11809

Open vanlueckn opened 9 months ago

vanlueckn commented 9 months ago

Environment

Bug Summary and Steps to Reproduce

Bug Summary:

I have a launch profile for debugging my C application. When i try to launch the debugger from vscode, i get the following error:

/bin/sh: /tmp/Microsoft-MIEngine-Cmd-mgfsu0jc.0b0: Datei oder Verzeichnis nicht gefunden

Launching the application without debugging works without any issues.

Steps to reproduce:

  1. Run Debugger with my launch profile in my environment (see debugger configurations)
  2. Error occurs

Debugger Configurations

{
    // 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": "(Linux) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/testbed",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/bin/",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "/usr/bin/gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            //"preLaunchTask": "C/C++: g++ build active file"
        }
    ]
}

Debugger Logs

--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (42) LaunchOptions{\"name\":\"(Linux) Launch\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"/home/nils/ssdbig/Projekte/PublicTransportGameEngine/bin/testbed\",\"args\":[],\"stopAtEntry\":false,\"cwd\":\"/home/nils/ssdbig/Projekte/PublicTransportGameEngine/bin/\",\"environment\":[],\"externalConsole\":false,\"MIMode\":\"gdb\",\"miDebuggerPath\":\"/usr/bin/gdb\",\"setupCommands\":[{\"description\":\"Enable pretty-printing for gdb\",\"text\":\"-enable-pretty-printing\",\"ignoreFailures\":true}],\"logging\":{\"engineLogging\":true,\"trace\":true,\"traceResponse\":true},\"__configurationTarget\":6,\"__sessionId\":\"150423f7-322e-4921-8783-6fd71cd4c102\"}\n"},"seq":2}
1: (42) LaunchOptions{"name":"(Linux) Launch","type":"cppdbg","request":"launch","program":"/home/nils/ssdbig/Projekte/PublicTransportGameEngine/bin/testbed","args":[],"stopAtEntry":false,"cwd":"/home/nils/ssdbig/Projekte/PublicTransportGameEngine/bin/","environment":[],"externalConsole":false,"MIMode":"gdb","miDebuggerPath":"/usr/bin/gdb","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"logging":{"engineLogging":true,"trace":true,"traceResponse":true},"__configurationTarget":6,"__sessionId":"150423f7-322e-4921-8783-6fd71cd4c102"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (68) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-j1r52o12.jdl ; cd \"/home/nils/ssdbig/Projekte/PublicTransportGameEngine/bin\" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm \"/tmp/Microsoft-MIEngine-In-4khxyljf.1ye\" \"/tmp/Microsoft-MIEngine-Out-vx5yyjue.xz3\" \"/tmp/Microsoft-MIEngine-Pid-j1r52o12.jdl\" \"/tmp/Microsoft-MIEngine-Cmd-1pcdnrjx.frq\"' EXIT ; \"/usr/bin/gdb\" --interpreter=mi --tty=$DbgTerm < \"/tmp/Microsoft-MIEngine-In-4khxyljf.1ye\" > \"/tmp/Microsoft-MIEngine-Out-vx5yyjue.xz3\" & clear; pid=$! ; echo $pid > \"/tmp/Microsoft-MIEngine-Pid-j1r52o12.jdl\" ; wait $pid; \n"},"seq":4}
1: (68) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-j1r52o12.jdl ; cd "/home/nils/ssdbig/Projekte/PublicTransportGameEngine/bin" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm "/tmp/Microsoft-MIEngine-In-4khxyljf.1ye" "/tmp/Microsoft-MIEngine-Out-vx5yyjue.xz3" "/tmp/Microsoft-MIEngine-Pid-j1r52o12.jdl" "/tmp/Microsoft-MIEngine-Cmd-1pcdnrjx.frq"' EXIT ; "/usr/bin/gdb" --interpreter

Other Extensions

No response

Additional Information

No response

vanlueckn commented 9 months ago

I tried the non flatpack version. This error only happens when using the flatpack version.