Expression format specifier support (#87)

* initial support for format specifier

* add readme notes for format specifiers

* add support for showing arrays and objects  with format specifiers

* create unique object variable references for different display formats

* add notes on applying formatting to objects and arrays
This commit is contained in:
Dave Holoway
2020-04-24 14:37:51 +01:00
committed by GitHub
parent 1535f133d9
commit a4ce09d309
5 changed files with 219 additions and 86 deletions

View File

@@ -53,7 +53,7 @@ class DebuggerStackFrame extends VariableManager {
}
const fetch_locals = async () => {
const values = await this.dbgr.getLocals(this.frame);
// display the variables in (case-insensitive) alphabetical order, with 'this' first and all-caps last
// display the variables in (case-insensitive) alphabetical order, with 'this' first
return this.locals = sortVariables(values, true, false);
}
// @ts-ignore
@@ -133,7 +133,7 @@ class DebuggerStackFrame extends VariableManager {
values = [await this.getBigString(varinfo)];
}
return (varinfo.cached = values).map(v => this.makeVariableValue(v));
return (varinfo.cached = values).map(v => this.makeVariableValue(v, varinfo.display_format));
}
async getObjectFields(varinfo) {