forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
61 lines (56 loc) · 2.02 KB
/
types.ts
File metadata and controls
61 lines (56 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { DebugSession, DebugSessionCustomEvent } from 'vscode';
import { AttachRequestArguments, LaunchRequestArguments } from '../../types';
export const IDebugSessionEventHandlers = Symbol('IDebugSessionEventHandlers');
export interface IDebugSessionEventHandlers {
handleCustomEvent?(e: DebugSessionCustomEvent): Promise<void>;
handleTerminateEvent?(e: DebugSession): Promise<void>;
}
export type ChildProcessLaunchData = {
/**
* The main process (that in turn starts child processes).
* @type {number}
*/
rootProcessId: number;
/**
* The immediate parent of the current process (identified by `processId`).
* This could be the same as `parentProcessId`, or something else.
* @type {number}
*/
parentProcessId: number;
/**
* The process id of the child process launched.
* @type {number}
*/
processId: number;
/**
* Port on which the child process is listening and waiting for the debugger to attach.
* @type {number}
*/
port: number;
/**
* The request object sent to the PTVSD by the main process.
* If main process was launched, then `arguments` would be the launch request arsg,
* else it would be the attach request args.
* @type {({
* // tslint:disable-next-line:no-banned-terms
* arguments: LaunchRequestArguments | AttachRequestArguments;
* command: 'attach' | 'request';
* seq: number;
* type: string;
* })}
*/
rootStartRequest: {
// tslint:disable-next-line:no-banned-terms
arguments: LaunchRequestArguments | AttachRequestArguments;
command: 'attach' | 'request';
seq: number;
type: string;
};
};
export const IChildProcessAttachService = Symbol('IChildProcessAttachService');
export interface IChildProcessAttachService {
attach(data: ChildProcessLaunchData): Promise<void>;
}