提交 e6d893b7 编写于 作者: I isidor

debug: limit hover to 5000

fixes #5935, fixes #5823
上级 14a01115
......@@ -35,6 +35,7 @@ import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
const $ = dom.emmet;
const booleanRegex = /^true|false$/i;
const stringRegex = /^(['"]).*\1$/;
const MAX_VALUE_RENDER_LENGTH = 5000;
export function renderExpressionValue(expressionOrValue: debug.IExpression|string, container: HTMLElement, showChanged: boolean): void {
let value = typeof expressionOrValue === 'string' ? expressionOrValue : expressionOrValue.value;
......@@ -59,6 +60,10 @@ export function renderExpressionValue(expressionOrValue: debug.IExpression|strin
// value changed color has priority over other colors.
container.className = 'value changed';
}
if (value.length > MAX_VALUE_RENDER_LENGTH) {
value = value.substr(0, MAX_VALUE_RENDER_LENGTH) + '...';
}
container.textContent = value;
container.title = value;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册