提交 ccfc1788 编写于 作者: I isidor

debug: tune watch expressions pane delaying

fixes #14499
上级 be59f611
...@@ -207,8 +207,12 @@ export class Expression extends ExpressionContainer implements debug.IExpression ...@@ -207,8 +207,12 @@ export class Expression extends ExpressionContainer implements debug.IExpression
constructor(public name: string, cacheChildren: boolean, id = generateUuid()) { constructor(public name: string, cacheChildren: boolean, id = generateUuid()) {
super(null, 0, id, cacheChildren, 0, 0); super(null, 0, id, cacheChildren, 0, 0);
this.value = Expression.DEFAULT_VALUE;
this.available = false; this.available = false;
// name is not set if the expression is just being added
// in that case do not set default value to prevent flashing #14499
if (name) {
this.value = Expression.DEFAULT_VALUE;
}
} }
public evaluate(process: debug.IProcess, stackFrame: debug.IStackFrame, context: string): TPromise<void> { public evaluate(process: debug.IProcess, stackFrame: debug.IStackFrame, context: string): TPromise<void> {
......
...@@ -641,7 +641,8 @@ export class DebugService implements debug.IDebugService { ...@@ -641,7 +641,8 @@ export class DebugService implements debug.IDebugService {
const process = this.model.addProcess(configuration.name, session); const process = this.model.addProcess(configuration.name, session);
if (!this.viewModel.focusedProcess) { if (!this.viewModel.focusedProcess) {
this.setFocusedStackFrameAndEvaluate(null, process); this.viewModel.setFocusedStackFrame(null, process);
this._onDidChangeState.fire();
} }
this.toDisposeOnSessionEnd[session.getId()] = []; this.toDisposeOnSessionEnd[session.getId()] = [];
if (client) { if (client) {
......
...@@ -56,7 +56,7 @@ export function renderExpressionValue(expressionOrValue: debug.IExpression | str ...@@ -56,7 +56,7 @@ export function renderExpressionValue(expressionOrValue: debug.IExpression | str
dom.addClass(container, 'string'); dom.addClass(container, 'string');
} }
if (showChanged && (<any>expressionOrValue).valueChanged) { if (showChanged && (<any>expressionOrValue).valueChanged && value !== Expression.DEFAULT_VALUE) {
// value changed color has priority over other colors. // value changed color has priority over other colors.
container.className = 'value changed'; container.className = 'value changed';
} }
......
...@@ -177,7 +177,7 @@ export class WatchExpressionsView extends CollapsibleViewletView { ...@@ -177,7 +177,7 @@ export class WatchExpressionsView extends CollapsibleViewletView {
this.tree.refresh().done(() => { this.tree.refresh().done(() => {
return this.toReveal instanceof Expression ? this.tree.reveal(this.toReveal) : TPromise.as(true); return this.toReveal instanceof Expression ? this.tree.reveal(this.toReveal) : TPromise.as(true);
}, errors.onUnexpectedError); }, errors.onUnexpectedError);
}, 250); }, 50);
} }
public renderHeader(container: HTMLElement): void { public renderHeader(container: HTMLElement): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册