microsoft / microsoft/vscode-cpptools

Error launching debugger in vscode

Open
#11,809 1 comment 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

Environment
  • OS and version: Arch Linux (rolling release)
  • VS Code: 1.84.2 (flatpack)
  • C/C++ extension: 1.18.5
  • OS and version of remote machine (if applicable): N/A
  • GDB / LLDB version: GNU gdb (GDB) 13.2
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

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 debugger launch path for the C/C++ extension and the MIEngine command shown in the Debugger Logs, reproducing the launch configuration on Arch Linux with GDB. Done means the configured C application launches under the debugger without the missing temporary command-file error; the issue names no source files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
arch-linux, cpp, typescript, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.