@@ -49,6 +49,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
4949import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
5050import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry' ;
5151import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService' ;
52+ import { ILogService } from 'vs/platform/log/common/log' ;
5253import { IOpenerService } from 'vs/platform/opener/common/opener' ;
5354import { IStorageService , StorageScope , StorageTarget } from 'vs/platform/storage/common/storage' ;
5455import { 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