1 | import { DebugProtocol } from 'vscode-debugprotocol';
|
2 | import { ProtocolServer } from './protocol';
|
3 | import { Event } from './messages';
|
4 | export declare class Source implements DebugProtocol.Source {
|
5 | name: string;
|
6 | path: string;
|
7 | sourceReference: number;
|
8 | constructor(name: string, path?: string, id?: number, origin?: string, data?: any);
|
9 | }
|
10 | export declare class Scope implements DebugProtocol.Scope {
|
11 | name: string;
|
12 | variablesReference: number;
|
13 | expensive: boolean;
|
14 | constructor(name: string, reference: number, expensive?: boolean);
|
15 | }
|
16 | export declare class StackFrame implements DebugProtocol.StackFrame {
|
17 | id: number;
|
18 | source: Source;
|
19 | line: number;
|
20 | column: number;
|
21 | name: string;
|
22 | constructor(i: number, nm: string, src?: Source, ln?: number, col?: number);
|
23 | }
|
24 | export declare class Thread implements DebugProtocol.Thread {
|
25 | id: number;
|
26 | name: string;
|
27 | constructor(id: number, name: string);
|
28 | }
|
29 | export declare class Variable implements DebugProtocol.Variable {
|
30 | name: string;
|
31 | value: string;
|
32 | variablesReference: number;
|
33 | constructor(name: string, value: string, ref?: number, indexedVariables?: number, namedVariables?: number);
|
34 | }
|
35 | export declare class Breakpoint implements DebugProtocol.Breakpoint {
|
36 | verified: boolean;
|
37 | constructor(verified: boolean, line?: number, column?: number, source?: Source);
|
38 | }
|
39 | export declare class Module implements DebugProtocol.Module {
|
40 | id: number | string;
|
41 | name: string;
|
42 | constructor(id: number | string, name: string);
|
43 | }
|
44 | export declare class CompletionItem implements DebugProtocol.CompletionItem {
|
45 | label: string;
|
46 | start: number;
|
47 | length: number;
|
48 | constructor(label: string, start: number, length?: number);
|
49 | }
|
50 | export declare class StoppedEvent extends Event implements DebugProtocol.StoppedEvent {
|
51 | body: {
|
52 | reason: string;
|
53 | threadId: number;
|
54 | };
|
55 | constructor(reason: string, threadId: number, exceptionText?: string);
|
56 | }
|
57 | export declare class ContinuedEvent extends Event implements DebugProtocol.ContinuedEvent {
|
58 | body: {
|
59 | threadId: number;
|
60 | };
|
61 | constructor(threadId: number, allThreadsContinued?: boolean);
|
62 | }
|
63 | export declare class InitializedEvent extends Event implements DebugProtocol.InitializedEvent {
|
64 | constructor();
|
65 | }
|
66 | export declare class TerminatedEvent extends Event implements DebugProtocol.TerminatedEvent {
|
67 | constructor(restart?: any);
|
68 | }
|
69 | export declare class OutputEvent extends Event implements DebugProtocol.OutputEvent {
|
70 | body: {
|
71 | category: string;
|
72 | output: string;
|
73 | data?: any;
|
74 | };
|
75 | constructor(output: string, category?: string, data?: any);
|
76 | }
|
77 | export declare class ThreadEvent extends Event implements DebugProtocol.ThreadEvent {
|
78 | body: {
|
79 | reason: string;
|
80 | threadId: number;
|
81 | };
|
82 | constructor(reason: string, threadId: number);
|
83 | }
|
84 | export declare class BreakpointEvent extends Event implements DebugProtocol.BreakpointEvent {
|
85 | body: {
|
86 | reason: string;
|
87 | breakpoint: Breakpoint;
|
88 | };
|
89 | constructor(reason: string, breakpoint: Breakpoint);
|
90 | }
|
91 | export declare class ModuleEvent extends Event implements DebugProtocol.ModuleEvent {
|
92 | body: {
|
93 | reason: 'new' | 'changed' | 'removed';
|
94 | module: Module;
|
95 | };
|
96 | constructor(reason: 'new' | 'changed' | 'removed', module: Module);
|
97 | }
|
98 | export declare class LoadedSourceEvent extends Event implements DebugProtocol.LoadedSourceEvent {
|
99 | body: {
|
100 | reason: 'new' | 'changed' | 'removed';
|
101 | source: Source;
|
102 | };
|
103 | constructor(reason: 'new' | 'changed' | 'removed', source: Source);
|
104 | }
|
105 | export declare class CapabilitiesEvent extends Event implements DebugProtocol.CapabilitiesEvent {
|
106 | body: {
|
107 | capabilities: DebugProtocol.Capabilities;
|
108 | };
|
109 | constructor(capabilities: DebugProtocol.Capabilities);
|
110 | }
|
111 | export declare enum ErrorDestination {
|
112 | User = 1,
|
113 | Telemetry = 2
|
114 | }
|
115 | export declare class DebugSession extends ProtocolServer {
|
116 | private _debuggerLinesStartAt1;
|
117 | private _debuggerColumnsStartAt1;
|
118 | private _debuggerPathsAreURIs;
|
119 | private _clientLinesStartAt1;
|
120 | private _clientColumnsStartAt1;
|
121 | private _clientPathsAreURIs;
|
122 | protected _isServer: boolean;
|
123 | constructor(obsolete_debuggerLinesAndColumnsStartAt1?: boolean, obsolete_isServer?: boolean);
|
124 | setDebuggerPathFormat(format: string): void;
|
125 | setDebuggerLinesStartAt1(enable: boolean): void;
|
126 | setDebuggerColumnsStartAt1(enable: boolean): void;
|
127 | setRunAsServer(enable: boolean): void;
|
128 | /**
|
129 | * A virtual constructor...
|
130 | */
|
131 | static run(debugSession: typeof DebugSession): void;
|
132 | shutdown(): void;
|
133 | protected sendErrorResponse(response: DebugProtocol.Response, codeOrMessage: number | DebugProtocol.Message, format?: string, variables?: any, dest?: ErrorDestination): void;
|
134 | runInTerminalRequest(args: DebugProtocol.RunInTerminalRequestArguments, timeout: number, cb: (response: DebugProtocol.RunInTerminalResponse) => void): void;
|
135 | protected dispatchRequest(request: DebugProtocol.Request): void;
|
136 | protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void;
|
137 | protected disconnectRequest(response: DebugProtocol.DisconnectResponse, args: DebugProtocol.DisconnectArguments): void;
|
138 | protected launchRequest(response: DebugProtocol.LaunchResponse, args: DebugProtocol.LaunchRequestArguments): void;
|
139 | protected attachRequest(response: DebugProtocol.AttachResponse, args: DebugProtocol.AttachRequestArguments): void;
|
140 | protected terminateRequest(response: DebugProtocol.TerminateResponse, args: DebugProtocol.TerminateArguments): void;
|
141 | protected restartRequest(response: DebugProtocol.RestartResponse, args: DebugProtocol.RestartArguments): void;
|
142 | protected setBreakPointsRequest(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments): void;
|
143 | protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void;
|
144 | protected setExceptionBreakPointsRequest(response: DebugProtocol.SetExceptionBreakpointsResponse, args: DebugProtocol.SetExceptionBreakpointsArguments): void;
|
145 | protected configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments): void;
|
146 | protected continueRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void;
|
147 | protected nextRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void;
|
148 | protected stepInRequest(response: DebugProtocol.StepInResponse, args: DebugProtocol.StepInArguments): void;
|
149 | protected stepOutRequest(response: DebugProtocol.StepOutResponse, args: DebugProtocol.StepOutArguments): void;
|
150 | protected stepBackRequest(response: DebugProtocol.StepBackResponse, args: DebugProtocol.StepBackArguments): void;
|
151 | protected reverseContinueRequest(response: DebugProtocol.ReverseContinueResponse, args: DebugProtocol.ReverseContinueArguments): void;
|
152 | protected restartFrameRequest(response: DebugProtocol.RestartFrameResponse, args: DebugProtocol.RestartFrameArguments): void;
|
153 | protected gotoRequest(response: DebugProtocol.GotoResponse, args: DebugProtocol.GotoArguments): void;
|
154 | protected pauseRequest(response: DebugProtocol.PauseResponse, args: DebugProtocol.PauseArguments): void;
|
155 | protected sourceRequest(response: DebugProtocol.SourceResponse, args: DebugProtocol.SourceArguments): void;
|
156 | protected threadsRequest(response: DebugProtocol.ThreadsResponse): void;
|
157 | protected terminateThreadsRequest(response: DebugProtocol.TerminateThreadsResponse, args: DebugProtocol.TerminateThreadsRequest): void;
|
158 | protected stackTraceRequest(response: DebugProtocol.StackTraceResponse, args: DebugProtocol.StackTraceArguments): void;
|
159 | protected scopesRequest(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments): void;
|
160 | protected variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): void;
|
161 | protected setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): void;
|
162 | protected setExpressionRequest(response: DebugProtocol.SetExpressionResponse, args: DebugProtocol.SetExpressionArguments): void;
|
163 | protected evaluateRequest(response: DebugProtocol.EvaluateResponse, args: DebugProtocol.EvaluateArguments): void;
|
164 | protected stepInTargetsRequest(response: DebugProtocol.StepInTargetsResponse, args: DebugProtocol.StepInTargetsArguments): void;
|
165 | protected gotoTargetsRequest(response: DebugProtocol.GotoTargetsResponse, args: DebugProtocol.GotoTargetsArguments): void;
|
166 | protected completionsRequest(response: DebugProtocol.CompletionsResponse, args: DebugProtocol.CompletionsArguments): void;
|
167 | protected exceptionInfoRequest(response: DebugProtocol.ExceptionInfoResponse, args: DebugProtocol.ExceptionInfoArguments): void;
|
168 | protected loadedSourcesRequest(response: DebugProtocol.LoadedSourcesResponse, args: DebugProtocol.LoadedSourcesArguments): void;
|
169 | /**
|
170 | * Override this hook to implement custom requests.
|
171 | */
|
172 | protected customRequest(command: string, response: DebugProtocol.Response, args: any): void;
|
173 | protected convertClientLineToDebugger(line: number): number;
|
174 | protected convertDebuggerLineToClient(line: number): number;
|
175 | protected convertClientColumnToDebugger(column: number): number;
|
176 | protected convertDebuggerColumnToClient(column: number): number;
|
177 | protected convertClientPathToDebugger(clientPath: string): string;
|
178 | protected convertDebuggerPathToClient(debuggerPath: string): string;
|
179 | private static path2uri;
|
180 | private static uri2path;
|
181 | private static _formatPIIRegexp;
|
182 | private static formatPII;
|
183 | }
|