Displaying custom types in STL containers

Hello,

I have a custom Python formatter for my own string type (a specialization of std::basic_string). It displays fine by itself but when it is inside an STL container (vector, map, etc), I lose the format (shows the default view that lldb uses when you don’t have a special formatter). How can I fix that? It’s not feasible to add a summary for every possible combination (especially for std::map).

Thanks!

Florin

It should work no matter where this type is. You will need to debug and find out why it isn't being found as that is a bug.

Ok,but how do you debug this? Debugging the debugger’s formatter seems non-trivial. Are there any guides/steps?

Thanks!

F.

I generally recommend enabling logs (through `log enable lldb
<category> -f ~/somefile.txt`) and then work back from there.
The logs tend to contain a lot of informations so I'd try with few
channels. I'd start with `formatters`.

To get a full list you can try:
(lldb) log list
(lldb) log help

This helped me to solve a few issues I would've otherwise had no clue
where to start (once I understand the context from the formatter, I
generally grep in the source code & set breakpoints).
Don't hesitate to ask if you have other questions.

Thanks,