codelldb: Cannot Inspect Variables
Which OS: Fedora 28 Which extension version: 0.8.6 Which LLDB version:
lldb version 5.0.0 (https://github.com/apple/swift-lldb.git revision 19b67d14444d5c2f4b1a614b799bb1d87c1776e0)
Swift-4.2 (revision f4903a04a5fbaa20b37972d7d96f788e3aff86d0)
clang revision 041fd44ebe859908dd634cc0066a4cb6c34e4a5e
llvm revision 85dee3a104d9ebc68ece691d076b0f9c5f225730
Which VSCode version: 1.22.2
Workspace Settings
{
"lldb.executable_env": {
"PATH": "/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/lldb-linux-x86_64/bin:${env:PATH}"
},
"lldb.executable": "/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/lldb-linux-x86_64/bin/lldb"
}
Launch Settings
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Launch",
"program": "/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/foundation-linux-x86_64/TestFoundation/TestFoundation",
"args": [],
"cwd": "${workspaceFolder}",
"env": {
"LD_LIBRARY_PATH": "/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/foundation-linux-x86_64/Foundation/:/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/xctest-linux-x86_64:/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/libdispatch-linux-x86_64/src/.libs"
}
}
]
}
What is the problem and how did you get there:
I cannot inspect values in the variables/watch area in VS Code or by typing in po <variable> in the debug console.
I know that if I launch lldb from a command line I can inspect the values. That is, doing this from a terminal works:
LD_LIBRARY_PATH=/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/foundation-linux-x86_64/Foundation/:/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/xctest-linux-x86_64:/home/rlovelett/Source/swift-source/build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/libdispatch-linux-x86_64/src/.libs: ../build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/foundation-linux-x86_64/../lldb-linux-x86_64/bin/lldb ../build/Ninja+cmark-DebugAssert+llvm-RelWithDebInfoAssert+swift-DebugAssert+stdlib-DebugAssert/foundation-linux-x86_64/TestFoundation/TestFoundation
What did you expect to have happened instead:
I expected to be able to inspect local variable values in either the VS Code watch area or variables area. If not there by executing specific lldb commands like po in the debug console.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 15 (7 by maintainers)
Can you try
frame varcommand in the debug console? If that fails to display variables, the next thing I would check that the correct version of lldb is getting launched (withpgrep -lfa lldbfor example).I don’t have a Fedora machine at hand, but on Ubuntu 16.04 debugging works fine, as long as I compile with debug info and use lldb provided in the Swift package (downloaded from swift.org).