Skip to content

Custom Data Formatters

vadimcn edited this page Jun 26, 2021 · 4 revisions

So, you want to create custom data formatters for your favorite library or a programming language?

Here's how I recommend going about it:

  • Familiarize yourself with the options LLDB provides.
  • Decide what level of customization your data types require.
    For many types, declarative type summary strings and type filters are quite adequate. If these fit you needs:
    • Create a file containing LLDB commands that create your customizations.
    • Load it via command source <file path> command, which can be added to initCommands launch target property in launch.json, or to lldb.launch.initCommands property in workspace or global settings.
      For example, "initCommands": ["command source '${workspaceFolder}/my_type_formatters'"].
    • Examples: [1], [2].
  • Otherwise, you'll need to do some Python scripting.
Clone this wiki locally