microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/debugger/nodeDebugAdapter.d.ts
99lines · modeblame
40e4b177Patricio Beltran10 years ago | 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. | |
| 3 | | |
| 4 | // These typings do not reflect the typings as intended to be used | |
| 5 | // but rather as they exist in truth, so we can reach into the internals | |
| 6 | // and access what we need. | |
e45838cbVladimir Kotikov9 years ago | 7 | declare module VSCodeDebugAdapterPackage { |
40e4b177Patricio Beltran10 years ago | 8 | class DebugSession { |
e45838cbVladimir Kotikov9 years ago | 9 | public static run(debugSession: typeof DebugSession): void; |
a8b90ac7Vladimir Kotikov9 years ago | 10 | // This is actually inherited from protocol server but we'll put it here |
| 11 | public start(inStream: NodeJS.ReadableStream, outStream: NodeJS.WritableStream): void; | |
| 12 | public sendEvent(event: Event): void; | |
e45838cbVladimir Kotikov9 years ago | 13 | } |
| 14 | class InitializedEvent extends Event { | |
40e4b177Patricio Beltran10 years ago | 15 | constructor(); |
| 16 | } | |
e45838cbVladimir Kotikov9 years ago | 17 | class OutputEvent extends Event { |
40e4b177Patricio Beltran10 years ago | 18 | constructor(message: string, destination?: string); |
| 19 | } | |
e45838cbVladimir Kotikov9 years ago | 20 | class TerminatedEvent extends Event { |
40e4b177Patricio Beltran10 years ago | 21 | constructor(); |
| 22 | } | |
e45838cbVladimir Kotikov9 years ago | 23 | class Event { |
| 24 | public event: string; | |
| 25 | public body: any; | |
| 26 | } | |
b8999098Dmitry Zinovyev9 years ago | 27 | class ContinuedEvent extends Event { |
| 28 | public seq: number; | |
| 29 | /** Must be 'event'. */ | |
| 30 | public type: string; | |
| 31 | public body: { | |
| 32 | threadId: number; | |
| 33 | }; | |
| 34 | } | |
e45838cbVladimir Kotikov9 years ago | 35 | interface Request { |
| 36 | command: string; | |
| 37 | arguments?: any; | |
| 38 | } | |
40e4b177Patricio Beltran10 years ago | 39 | } |
| 40 | | |
e45838cbVladimir Kotikov9 years ago | 41 | declare module ChromeDebuggerCorePackage { |
| 42 | abstract class ChromeDebugAdapter { | |
| 43 | protected _attachMode: boolean; | |
| 44 | protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>; | |
| 45 | } | |
40e4b177Patricio Beltran10 years ago | 46 | |
e45838cbVladimir Kotikov9 years ago | 47 | interface IChromeDebugSessionOpts { |
| 48 | logFilePath?: string; | |
| 49 | adapter: typeof ChromeDebugAdapter; | |
| 50 | extensionName: string; | |
| 51 | } | |
40e4b177Patricio Beltran10 years ago | 52 | |
e45838cbVladimir Kotikov9 years ago | 53 | class ChromeDebugSession extends VSCodeDebugAdapterPackage.DebugSession { |
| 54 | protected _debugAdapter: any; | |
| 55 | constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean, opts?: IChromeDebugSessionOpts); | |
| 56 | protected dispatchRequest(request: { command: string }): void; | |
| 57 | } | |
40e4b177Patricio Beltran10 years ago | 58 | } |
| 59 | | |
e45838cbVladimir Kotikov9 years ago | 60 | declare module Node2DebugAdapterPackage { |
471a26dfNikita Matrosov9 years ago | 61 | |
| 62 | type ChecksumAlgorithm = "MD5" | "SHA1" | "SHA256" | "timestamp"; | |
| 63 | | |
| 64 | interface Checksum { | |
| 65 | algorithm: ChecksumAlgorithm; | |
| 66 | checksum: string; | |
| 67 | } | |
| 68 | | |
| 69 | interface Source { | |
| 70 | name?: string; | |
| 71 | path?: string; | |
| 72 | sourceReference?: number; | |
| 73 | presentationHint?: "emphasize" | "deemphasize"; | |
| 74 | origin?: string; | |
| 75 | adapterData?: any; | |
| 76 | checksums?: Checksum[]; | |
| 77 | } | |
| 78 | | |
| 79 | interface Breakpoint { | |
| 80 | id?: number; | |
| 81 | verified: boolean; | |
| 82 | message?: string; | |
| 83 | source?: Source; | |
| 84 | line?: number; | |
| 85 | column?: number; | |
| 86 | endLine?: number; | |
| 87 | endColumn?: number; | |
| 88 | } | |
| 89 | | |
| 90 | interface ISetBreakpointsResponseBody { | |
| 91 | breakpoints: Breakpoint[]; | |
| 92 | } | |
| 93 | | |
e45838cbVladimir Kotikov9 years ago | 94 | class Node2DebugAdapter extends ChromeDebuggerCorePackage.ChromeDebugAdapter { |
8049d420Vladimir Kotikov9 years ago | 95 | protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>; |
471a26dfNikita Matrosov9 years ago | 96 | public setBreakpoints(args: any, requestSeq: number, ids?: number[]): Promise<ISetBreakpointsResponseBody>; |
e45838cbVladimir Kotikov9 years ago | 97 | } |
774cffd7Vladimir Kotikov9 years ago | 98 | } |
e45838cbVladimir Kotikov9 years ago | 99 | |