microsoft / microsoft/vscode-cpptools

Debugger not working

Open
#6,369 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger more info needed
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Debugger

Hi team
I have set up the vscode for c++ in the following article as described. But When I am trying to follow the debugger setup steps, I am getting the following error and my debugger is not able to start.

Error
Unable to start debugging. Unable to establish a connection to LLDB. The following message was written to stderr:

dyld: lazy symbol binding failed: Symbol not found: __ZN4lldb20SBCommandInterpreter15SetPromptOnQuitEb
Referenced from: /Users/shubham.goyal/.vscode/extensions/ms-vscode.cpptools-1.0.1/debugAdapters/lldb-mi/bin/lldb-mi
Expected in: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB
dyld: Symbol not found: __ZN4lldb20SBCommandInterpreter15SetPromptOnQuitEb
Referenced from: /Users/shubham.goyal/.vscode/extensions/ms-vscode.cpptools-1.0.1/debugAdapters/lldb-mi/bin/lldb-mi
Expected in: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB
0 lldb-mi 0x000000010d99f615 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 lldb-mi 0x000000010d99e4a6 llvm::sys::RunSignalHandlers() + 198
2 lldb-mi 0x000000010d99febc SignalHandler(int) + 268
3 libsystem_platform.dylib 0x00007fff786ddb5d _sigtramp + 29
4 libsystem_platform.dylib 0x0000000115e8e6d4 _sigtramp + 18446603343158250388
5 libsystem_platform.dylib 0x0000000115e6cbd2 _sigtramp + 18446603343158112402
6 libsystem_platform.dylib 0x0000000115e2ca9d _sigtramp + 18446603343157849949
7 libsystem_platform.dylib 0x0000000115e2cbc7 _sigtramp + 18446603343157850247
8 libdyld.dylib 0x00007fff784de32e dyld_stub_binder + 282

I feel it has something to do with xcode version.
Describe the bug
OS version: Mac os 10.14.6 mojave
Vscode version: 1.50.1
xcode version: 2354

tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-std=c++14",
"-stdlib=libc++",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

launch.json
{
// 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": "clang++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "clang++ build active file"
}
],
"logging": { "engineLogging": true, "trace": true, "traceResponse": true }
}

Please point me out in right direction to solve this.
Thanks

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 reported tasks.json and launch.json configurations and the lldb-mi path in the error. Reproduce the launch using the specified macOS, VS Code, Xcode, and C/C++ extension versions, then compare the bundled lldb-mi symbols with the Xcode LLDB framework. Done means the configured C++ program starts debugging without the missing-symbol error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.