未验证 提交 d6d6d681 编写于 作者: C Connor Peet

debug: don't rerequest scripts whenever a session label changes

上级 5fc4d714
......@@ -58,6 +58,10 @@ class BaseTreeItem {
this._showedMoreThanOne = false;
}
updateLabel(label: string) {
this._label = label;
}
isLeaf(): boolean {
return this._children.size === 0;
}
......@@ -528,9 +532,11 @@ export class LoadedScriptsView extends ViewPane {
const registerSessionListeners = (session: IDebugSession) => {
this._register(session.onDidChangeName(async () => {
// Re-add session, this will trigger proper sorting and id recalculation.
root.remove(session.getId());
await addSourcePathsToSession(session);
const sessionRoot = root.find(session);
if (sessionRoot) {
sessionRoot.updateLabel(session.getLabel());
scheduleRefreshOnVisible();
}
}));
this._register(session.onDidLoadedSource(async event => {
let sessionRoot: SessionTreeItem;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册