microsoft / microsoft/vscode-cpptools

Unable to debug C++ code in Mac M1 Max

Open
#11,397 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: Ventura 13.5.1 (22G90)
  • VS Code Version: Version: 1.81.1 (Universal)
  • C/C++ Extension Version: v1.17.5
  • If using SSH remote, specify OS of remote machine: I can share my screen with TeamViewer or Google Meet if needed.
Bug Summary and Steps to Reproduce

Bug Summary:
The program is not able to handle inputs while debugging. I am getting "Unable to perform this action because the process is running." I had raised a ticket to VS code. They did some analysis and told me to raise issue here. Kindly help.

Steps to reproduce:

  1. Write a simple C++ program.
  2. Click on debugger.
  3. Provide input in the debug console.
  4. Show an error in red "Unable to perform this action because the process is running."

Expected behavior:
It should be able to take input and let me debug.

Configuration and Logs
c_cpp_properties.json:
{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "macos-clang-arm64"
        }
    ],
    "version": 4
}

launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(lldb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "enter program name, for example ${workspaceFolder}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb"
        }
    ]
}

tasks.json:
{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: clang++ build active file",
            "command": "/usr/bin/clang++",
            "args": [
                "-fcolor-diagnostics",
                "-fansi-escape-codes",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        }
    ],
    "version": "2.0.0"
}
Other Extensions

No response

Additional context

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 by reproducing the issue on the reported Ventura 13.5.1, VS Code 1.81.1, and C/C++ extension v1.17.5 setup, using the launch.json, tasks.json, and c_cpp_properties.json shown. Check the debugger and debug console behavior when the C++ program requests input; done means input is accepted during debugging without the reported process-running error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.