================
@@ -836,7 +837,10 @@ std::string
VariableDescription::GetResult(protocol::EvaluateContext context) {
// Try the SBValue::GetDescription(), which may call into language runtime
// specific formatters (see ValueObjectPrinter).
lldb::SBStream stream;
- v.GetDescription(stream);
+ if (context == protocol::eEvaluateContextRepl)
----------------
DrSergei wrote:
My intention here was to keep existing behavior for primitive types such as
numbers and booleans, when VS Code just returns their value. So additional
context might be noisy in this case.
## Some examples
### Brief
```
size=3 {
[0] = 1
[1] = 2
[2] = 3
}
42
```
### Full
```
(std::vector<int>) v = size=3 {
[0] = 1
[1] = 2
[2] = 3
}
(int) n = 42
```
### Verbose
```
0x00007fffffffd980: (std::vector<int>) v = size=3 {
0x000055555556b2b0: (int) [0] = 1
0x000055555556b2b4: (int) [1] = 2
0x000055555556b2b8: (int) [2] = 3
}
0x00007fffffffd974: (int) n = 42
```
https://github.com/llvm/llvm-project/pull/170644
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits