microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
471a26dfc551c3006b79eff6e1a6323938d9b90d

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/debugger/nodeDebugAdapter.d.ts

91lines · modecode

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.
7declare module VSCodeDebugAdapterPackage {
8 class DebugSession {
9 public static run(debugSession: typeof DebugSession): void;
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;
13 }
14 class InitializedEvent extends Event {
15 constructor();
16 }
17 class OutputEvent extends Event {
18 constructor(message: string, destination?: string);
19 }
20 class TerminatedEvent extends Event {
21 constructor();
22 }
23 class Event {
24 public event: string;
25 public body: any;
26 }
27 interface Request {
28 command: string;
29 arguments?: any;
30 }
31}
32
33declare module ChromeDebuggerCorePackage {
34 abstract class ChromeDebugAdapter {
35 protected _attachMode: boolean;
36 protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>;
37 }
38
39 interface IChromeDebugSessionOpts {
40 logFilePath?: string;
41 adapter: typeof ChromeDebugAdapter;
42 extensionName: string;
43 }
44
45 class ChromeDebugSession extends VSCodeDebugAdapterPackage.DebugSession {
46 protected _debugAdapter: any;
47 constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean, opts?: IChromeDebugSessionOpts);
48 protected dispatchRequest(request: { command: string }): void;
49 }
50}
51
52declare module Node2DebugAdapterPackage {
53
54 type ChecksumAlgorithm = "MD5" | "SHA1" | "SHA256" | "timestamp";
55
56 interface Checksum {
57 algorithm: ChecksumAlgorithm;
58 checksum: string;
59 }
60
61 interface Source {
62 name?: string;
63 path?: string;
64 sourceReference?: number;
65 presentationHint?: "emphasize" | "deemphasize";
66 origin?: string;
67 adapterData?: any;
68 checksums?: Checksum[];
69 }
70
71 interface Breakpoint {
72 id?: number;
73 verified: boolean;
74 message?: string;
75 source?: Source;
76 line?: number;
77 column?: number;
78 endLine?: number;
79 endColumn?: number;
80 }
81
82 interface ISetBreakpointsResponseBody {
83 breakpoints: Breakpoint[];
84 }
85
86 class Node2DebugAdapter extends ChromeDebuggerCorePackage.ChromeDebugAdapter {
87 protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>;
88 public setBreakpoints(args: any, requestSeq: number, ids?: number[]): Promise<ISetBreakpointsResponseBody>;
89 }
90}