Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/debug/common/extensionHostDebug.ts
5237 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
port?: number;
33
success: boolean;
34
}
35
36
export interface IExtensionHostDebugService {
37
readonly _serviceBrand: undefined;
38
39
reload(sessionId: string): void;
40
readonly onReload: Event<IReloadSessionEvent>;
41
42
close(sessionId: string): void;
43
readonly onClose: Event<ICloseSessionEvent>;
44
45
attachSession(sessionId: string, port: number, subId?: string): void;
46
readonly onAttachSession: Event<IAttachSessionEvent>;
47
48
terminateSession(sessionId: string, subId?: string): void;
49
readonly onTerminateSession: Event<ITerminateSessionEvent>;
50
51
openExtensionDevelopmentHostWindow(args: string[], debugRenderer: boolean): Promise<IOpenExtensionWindowResult>;
52
53
attachToCurrentWindowRenderer(windowId: number): Promise<IOpenExtensionWindowResult>;
54
}
55
56