Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/debug/common/extensionHostDebug.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Event } from '../../../base/common/event.js';
7
import { createDecorator } from '../../instantiation/common/instantiation.js';
8
9
export const IExtensionHostDebugService = createDecorator<IExtensionHostDebugService>('extensionHostDebugService');
10
11
export interface IAttachSessionEvent {
12
sessionId: string;
13
subId?: string;
14
port: number;
15
}
16
17
export interface ITerminateSessionEvent {
18
sessionId: string;
19
subId?: string;
20
}
21
22
export interface IReloadSessionEvent {
23
sessionId: string;
24
}
25
26
export interface ICloseSessionEvent {
27
sessionId: string;
28
}
29
30
export interface IOpenExtensionWindowResult {
31
rendererDebugAddr?: string;
32
success: boolean;
33
}
34
35
export interface IExtensionHostDebugService {
36
readonly _serviceBrand: undefined;
37
38
reload(sessionId: string): void;
39
readonly onReload: Event<IReloadSessionEvent>;
40
41
close(sessionId: string): void;
42
readonly onClose: Event<ICloseSessionEvent>;
43
44
attachSession(sessionId: string, port: number, subId?: string): void;
45
readonly onAttachSession: Event<IAttachSessionEvent>;
46
47
terminateSession(sessionId: string, subId?: string): void;
48
readonly onTerminateSession: Event<ITerminateSessionEvent>;
49
50
openExtensionDevelopmentHostWindow(args: string[], debugRenderer: boolean): Promise<IOpenExtensionWindowResult>;
51
52
attachToCurrentWindowRenderer(windowId: number): Promise<IOpenExtensionWindowResult>;
53
}
54
55