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
107 lines (94 loc) · 3.12 KB
/
types.ts
File metadata and controls
107 lines (94 loc) · 3.12 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { DebugConfiguration } from 'vscode';
import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol';
import { DebuggerTypeName } from './constants';
export enum DebugOptions {
RedirectOutput = 'RedirectOutput',
Django = 'Django',
Jinja = 'Jinja',
DebugStdLib = 'DebugStdLib',
Sudo = 'Sudo',
Pyramid = 'Pyramid',
FixFilePathCase = 'FixFilePathCase',
WindowsClient = 'WindowsClient',
UnixClient = 'UnixClient',
StopOnEntry = 'StopOnEntry',
ShowReturnValue = 'ShowReturnValue',
SubProcess = 'Multiprocess'
}
export type PathMapping = {
localRoot: string;
remoteRoot: string;
};
export type Connection = {
host?: string;
port?: number;
};
interface ICommonDebugArguments {
redirectOutput?: boolean;
django?: boolean;
gevent?: boolean;
jinja?: boolean;
debugStdLib?: boolean;
justMyCode?: boolean;
logToFile?: boolean;
debugOptions?: DebugOptions[];
port?: number;
host?: string;
// Show return values of functions while stepping.
showReturnValue?: boolean;
subProcess?: boolean;
// An absolute path to local directory with source.
pathMappings?: PathMapping[];
}
export interface IKnownAttachDebugArguments extends ICommonDebugArguments {
workspaceFolder?: string;
customDebugger?: boolean;
// localRoot and remoteRoot are deprecated (replaced by pathMappings).
localRoot?: string;
remoteRoot?: string;
// Internal field used to attach to subprocess using python debug adapter
subProcessId?: number;
processId?: number | string;
connect?: Connection;
listen?: Connection;
}
export interface IKnownLaunchRequestArguments extends ICommonDebugArguments {
sudo?: boolean;
pyramid?: boolean;
workspaceFolder?: string;
// An absolute path to the program to debug.
module?: string;
program?: string;
pythonPath: string;
// Automatically stop target after launch. If not specified, target does not stop.
stopOnEntry?: boolean;
args: string[];
cwd?: string;
debugOptions?: DebugOptions[];
env?: Record<string, string | undefined>;
envFile: string;
console?: ConsoleType;
// Internal field used to set custom python debug adapter (for testing)
debugAdapterPath?: string;
}
// tslint:disable-next-line:interface-name
export interface LaunchRequestArguments
extends DebugProtocol.LaunchRequestArguments,
IKnownLaunchRequestArguments,
DebugConfiguration {
type: typeof DebuggerTypeName;
}
// tslint:disable-next-line:interface-name
export interface AttachRequestArguments
extends DebugProtocol.AttachRequestArguments,
IKnownAttachDebugArguments,
DebugConfiguration {
type: typeof DebuggerTypeName;
}
// tslint:disable-next-line:interface-name
export interface DebugConfigurationArguments extends LaunchRequestArguments, AttachRequestArguments {}
export type ConsoleType = 'internalConsole' | 'integratedTerminal' | 'externalTerminal';
export type TriggerType = 'launch' | 'attach' | 'test';