microsoft / microsoft/vscode-cpptools

macOS lldbinit not loaded

Open
#12,580 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment
  • OS and version: macOS Sonoma 14.6.1
  • VS Code: Version: 1.92.2 (Universal)
    Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
    Date: 2024-08-14T17:29:30.058Z
    Electron: 30.1.2
    ElectronBuildId: 9870757
    Chromium: 124.0.6367.243
    Node.js: 20.14.0
    V8: 12.4.254.20-electron.0
    OS: Darwin arm64 23.6.0
  • C/C++ extension: v1.21.6
  • OS and version of remote machine (if applicable): na
  • GDB / LLDB version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Bug Summary and Steps to Reproduce

Bug Summary: VSCode LLDB does not load ~/.lldbinit file content (.lldbinit in project dir is also not loaded).

Steps to reproduce:

  1. MacOS C++ project that is running, My app sends signal to itself that should not cause breakpoint.
  2. ~/.lldbinit "pro hand -p true -s false -n true SIGUSR1"
  3. Use Run and Debug to launch process and debug it using lldb.
  4. Process receives signal and causes breakpoint instead of skipping it.
Debugger Configurations
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(lldb) myprogram",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/src/main/myprogram",
            "args": [
                "--nodaemon"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [
                {
                    "name": "MY_HOME", 
                    "value": "${env:MY_HOME}"
                },
            ],
            "externalConsole": false,
            "MIMode": "lldb",
        }
}
Debugger Logs
na
Other Extensions

No response

Additional Information

Opening lldb in VSCode console and executing lldb command shows that config is then loaded (so it's correct), but VSCode seems to ignore it. Using Clion as alternative works as expected.

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 with the provided macOS launch configuration and the ~/.lldbinit signal-handling command. Compare LLDB startup behavior in Run and Debug with the manual console case; done means the project or home .lldbinit settings are loaded before the process handles SIGUSR1.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.