vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.52k stars 245 forks source link

Improve summary printing #933

Closed aljoscha closed 1 year ago

aljoscha commented 1 year ago

Before, it could happen that a child doesn't have a value, so it would be omitted from the summary. Similarly, it can happen that a child doesn't have a summary but has a value.

Now, we first try the summary and fall back to the value.

Without this change, when printing this struct in a log point using "foo is {foo}" we would just get "foo is {...}":

struct Foo {
    bar: String,
}

With the fix, we get "foo is {bar:"a string"}"

While we were at it, we also bumped MAX_LENGTH to 512 but I'm not married to that.

vadimcn commented 1 year ago

Thanks!

aljoscha commented 1 year ago

Thank you for taking the time and the project overall! 🙇‍♂️