[Lldb-commits] [PATCH] D134333: When there are variable errors, display an error in VS Code's local variables view.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 20 21:02:25 PDT 2022


clayborg created this revision.
clayborg added reviewers: labath, JDevlieghere, yinghuitan.
Herald added a project: All.
clayborg requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

After recent diffs that enable variable errors that stop variables from being correctly displayed when debugging, allow users to see these errors in the LOCALS variables in the VS Code UI. We do this by detecting when no variables are available and when there is an error to be displayed, and we add a single variable named "<error>" whose value is a string error that the user can read. This allows the user to be aware of the reason variables are not available and fix the issue. Previously if someone enabled "-gline-tables-only" or was debugging with DWARF in .o files or with .dwo files and those separate object files were missing or they were out of date, the user would see nothing in the variables view. Communicating these errors to the user is essential to a good debugging experience.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134333

Files:
  lldb/source/API/SBError.cpp
  lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py
  lldb/tools/lldb-vscode/lldb-vscode.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134333.461786.patch
Type: text/x-patch
Size: 6199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220921/f507ca84/attachment-0001.bin>


More information about the lldb-commits mailing list