vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

LLDB Crash with exit code 139 on macOS 15.5 when launching C++ debug session

Open Subham-KRLX opened this issue 7 months ago • 2 comments

Environment

  • OS and version: macOS 15.5 (Build 24F74)
  • VS Code: 1.90.0
  • C/C++ extension: 1.19.9
  • OS and version of remote machine (if applicable): Not applicable
  • GDB / LLDB version: lldb-1900.0.39.0

Bug Summary and Steps to Reproduce

Bug Summary: LLDB crashes with exit code 139 when launching a basic C++ program from VS Code using the C++ extension with MIMode set to "lldb".

Steps to reproduce:

  1. Install VS Code with the C++ extension on macOS 15.5.
  2. Create a simple C++ program (e.g., main.cpp printing "Hello, LLDB!").
  3. Compile it using clang++ main.cpp -o main.
  4. Use the following launch.json configuration with "MIMode": "lldb".
  5. Run the debugger.
  6. LLDB crashes with exit code 139.

Debugger Configurations

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "LLDB Test",
      "type": "cppdbg",
      "request": "launch",
      "program": "${workspaceFolder}/main",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${workspaceFolder}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "lldb",
      "miDebuggerPath": "/usr/bin/lldb",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for LLDB",
          "text": "settings set target.inline-breakpoint-strategy always",
          "ignoreFailures": true
        }
      ]
    }
  ]
}

Debugger Logs

"logging": {
  "engineLogging": true,
  "trace": true,
  "traceResponse": true
}

Other Extensions

Only C/C++ and CodeLLDB extensions are enabled. The issue persists even with all other extensions disabled.

Additional Information

This issue appears to be the same as #13496. I followed all the steps to reproduce and used the latest version of the extension. The program runs correctly via terminal (./main), but crashes only via the debugger.

Subham-KRLX avatar Jun 15 '25 03:06 Subham-KRLX

Thank you for reporting this issue. We’ll let you know if we need more information to investigate it. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated.

github-actions[bot] avatar Jun 17 '25 13:06 github-actions[bot]

macOS : 15.5 (Build 24F74) VS Code : 1.90.0 C/C++ ext.: 1.19.9 LLDB : lldb-1900.0.39.0 (lldb --version) Launch.json: [paste your launch.json] Repro steps: same as described in the issue Crash detail: exit code 139 (SIGSEGV)

Subham-KRLX avatar Jun 17 '25 13:06 Subham-KRLX

I've opened a PR (#13704) that adds documentation for this crash scenario and includes a potential workaround.

The issue seems to consistently reproduce with LLDB on macOS 15.5 when launching C++ debug sessions via VS Code. If others encountering this can verify or provide feedback on the workaround mentioned in the PR, it would be very helpful.

Subham-KRLX avatar Jun 18 '25 05:06 Subham-KRLX