Skip to content

Commit

Permalink
Skip debug tree error in telemetry (#165535)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Nov 4, 2022
1 parent cdc521a commit ed71512
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/vs/workbench/contrib/debug/browser/repl.ts
Expand Up @@ -49,6 +49,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
import { ILogService } from 'vs/platform/log/common/log';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
Expand Down Expand Up @@ -129,6 +130,7 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
@ITelemetryService telemetryService: ITelemetryService,
@IMenuService menuService: IMenuService,
@ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService,
@ILogService private readonly logService: ILogService,
) {
const filterText = storageService.get(FILTER_VALUE_STORAGE_KEY, StorageScope.WORKSPACE, '');
super({
Expand Down Expand Up @@ -401,7 +403,13 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
});

if (this.tree && treeInput !== session) {
await this.tree.setInput(session);
try {
await this.tree.setInput(session);
} catch (err) {
// Ignore error because this may happen multiple times while refreshing,
// then changing the root may fail. Log to help with debugging if needed.
this.logService.error(err);
}
revealLastElement(this.tree);
}
}
Expand Down

0 comments on commit ed71512

Please sign in to comment.