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 this fits you needs:
    • Create a file containing LLDB commands that create your customizations.
    • Load it via command source <file path> command, which you can add to initCommands property in launch.json, or to lldb.launch.initCommands configuration property in workspace or global settings.
      For example, "initCommands": ["command source '${workspaceFolder}/my_type_formatters'"].
    • Examples of declarative type summaries: [1], [2].
  • Otherwise, you'll need to do some Python scripting:
Clone this wiki locally