File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/debug/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import { IDebugHelperService } from 'vs/workbench/contrib/debug/common/debug';
1212import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation' ;
1313import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
1414import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService' ;
15+ import { IChannel } from 'vs/base/parts/ipc/common/ipc' ;
16+ import { Event } from 'vs/base/common/event' ;
1517
1618class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
1719
@@ -22,11 +24,16 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
2224 ) {
2325 const connection = remoteAgentService . getConnection ( ) ;
2426
25- if ( ! connection ) {
26- throw new Error ( 'Missing agent connection' ) ;
27+ let channel : IChannel ;
28+ if ( connection ) {
29+ channel = connection . getChannel ( ExtensionHostDebugBroadcastChannel . ChannelName ) ;
30+ } else {
31+ channel = { call : async ( ) => undefined , listen : ( ) => Event . None } as any ;
32+ // TODO@weinand TODO@isidorn fallback?
33+ console . warn ( 'Extension Host Debugging not available due to missing connection.' ) ;
2734 }
2835
29- super ( connection . getChannel ( ExtensionHostDebugBroadcastChannel . ChannelName ) ) ;
36+ super ( channel ) ;
3037
3138 this . _register ( this . onReload ( event => {
3239 if ( environmentService . isExtensionDevelopment && environmentService . debugExtensionHost . debugId === event . sessionId ) {
You can’t perform that action at this time.
0 commit comments