Skip to content

Commit a8fa2b6

Browse files
committed
Skip debug tree error in telemetry
Fix #164053
1 parent b75ba63 commit a8fa2b6

File tree

1 file changed

+9
-1
lines changed
  • src/vs/workbench/contrib/debug/browser

1 file changed

+9
-1
lines changed

src/vs/workbench/contrib/debug/browser/repl.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
4949
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
5050
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
5151
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
52+
import { ILogService } from 'vs/platform/log/common/log';
5253
import { IOpenerService } from 'vs/platform/opener/common/opener';
5354
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
5455
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -129,6 +130,7 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
129130
@ITelemetryService telemetryService: ITelemetryService,
130131
@IMenuService menuService: IMenuService,
131132
@ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService,
133+
@ILogService private readonly logService: ILogService,
132134
) {
133135
const filterText = storageService.get(FILTER_VALUE_STORAGE_KEY, StorageScope.WORKSPACE, '');
134136
super({
@@ -401,7 +403,13 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
401403
});
402404

403405
if (this.tree && treeInput !== session) {
404-
await this.tree.setInput(session);
406+
try {
407+
await this.tree.setInput(session);
408+
} catch (err) {
409+
// Ignore error because this may happen multiple times while refreshing,
410+
// then changing the root may fail. Log to help with debugging if needed.
411+
this.logService.error(err);
412+
}
405413
revealLastElement(this.tree);
406414
}
407415
}

0 commit comments

Comments
 (0)