Skip to content

Commit 4deeb95

Browse files
committed
support "restart" EH debugging
1 parent 3718b5c commit 4deeb95

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/vs/workbench/browser/web.simpleservices.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/co
3030
import { pathsToEditors } from 'vs/workbench/common/editor';
3131
import { IFileService } from 'vs/platform/files/common/files';
3232
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
33-
import { ParsedArgs } from 'vs/platform/environment/common/environment';
33+
import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment';
3434
import { IProcessEnvironment } from 'vs/base/common/platform';
3535
import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage';
3636
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
@@ -564,7 +564,9 @@ registerSingleton(IWindowService, SimpleWindowService);
564564
export class SimpleExtensionHostDebugService extends ExtensionHostDebugChannelClient {
565565

566566
constructor(
567-
@IRemoteAgentService remoteAgentService: IRemoteAgentService
567+
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
568+
//@IWindowService windowService: IWindowService,
569+
@IEnvironmentService environmentService: IEnvironmentService
568570
) {
569571
const connection = remoteAgentService.getConnection();
570572

@@ -573,6 +575,19 @@ export class SimpleExtensionHostDebugService extends ExtensionHostDebugChannelCl
573575
}
574576

575577
super(connection.getChannel(ExtensionHostDebugBroadcastChannel.ChannelName));
578+
579+
this._register(this.onReload(event => {
580+
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
581+
//windowService.reloadWindow();
582+
window.location.reload();
583+
}
584+
}));
585+
this._register(this.onClose(event => {
586+
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
587+
//this._windowService.closeWindow();
588+
window.close();
589+
}
590+
}));
576591
}
577592
}
578593
registerSingleton(IExtensionHostDebugService, SimpleExtensionHostDebugService);

0 commit comments

Comments
 (0)