提交 216c9558 编写于 作者: I isidor

debug: only send chunk range when totalCount explicitly specified by adapter

上级 b86b6e18
......@@ -257,10 +257,12 @@ export abstract class ExpressionContainer implements debug.IExpressionContainer
}
this.children = TPromise.as(chunks);
} else {
const start = this.getChildrenInChunks ? this.chunkIndex * ExpressionContainer.CHUNK_SIZE : undefined;
const count = this.getChildrenInChunks ? ExpressionContainer.CHUNK_SIZE : undefined;
this.children = session.variables({
variablesReference: this.reference,
start: this.chunkIndex * ExpressionContainer.CHUNK_SIZE,
count: ExpressionContainer.CHUNK_SIZE
start,
count
}).then(response => {
return arrays.distinct(response.body.variables.filter(v => !!v), v => v.name).map(
v => new Variable(this, v.variablesReference, v.name, v.value, v.totalCount, v.type)
......@@ -281,6 +283,11 @@ export abstract class ExpressionContainer implements debug.IExpressionContainer
return this._value;
}
// The adapter explicitly sents the children count of an expression only if there are lots of children which should be chunked.
private get getChildrenInChunks(): boolean {
return !!this.childrenCount;
}
public set value(value: string) {
this._value = massageValue(value);
this.valueChanged = ExpressionContainer.allValues[this.getId()] &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册