Chromium Code Reviews| Index: runtime/vm/debugger.cc |
| diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
| index 5e4dfd9d575c9aab0549c9309dc7182d2cc99e73..231ea4c61ae4714eaf36c36fa9e9a2d0e5ed3048 100644 |
| --- a/runtime/vm/debugger.cc |
| +++ b/runtime/vm/debugger.cc |
| @@ -1028,6 +1028,11 @@ RawObject* ActivationFrame::GetReceiver() { |
| } |
| +bool IsPrivateVariableName(const String& var_name) { |
|
rmacnak
2015/10/07 18:06:21
Library::IsPrivate already exists and handles more
|
| + return (var_name.Length() >= 1) && (var_name.CharAt(0) == '_'); |
| +} |
| + |
| + |
| RawObject* ActivationFrame::Evaluate(const String& expr) { |
| GetDescIndices(); |
| const GrowableObjectArray& param_names = |
| @@ -1041,6 +1046,9 @@ RawObject* ActivationFrame::Evaluate(const String& expr) { |
| intptr_t ignore; |
| VariableAt(i, &name, &ignore, &ignore, &value); |
| if (!name.Equals(Symbols::This())) { |
| + if (IsPrivateVariableName(name)) { |
| + name = String::IdentifierPrettyName(name); |
| + } |
| param_names.Add(name); |
| param_values.Add(value); |
| } |