microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
a10fb050eee3276c9b42fc2b6bf50c3eb07ed5ae

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/debugger/nodeDebugAdapter.d.ts

99lines · 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 class ContinuedEvent extends Event {
28 public seq: number;
29 /** Must be 'event'. */
30 public type: string;
31 public body: {
32 threadId: number;
33 };
34 }
35 interface Request {
36 command: string;
37 arguments?: any;
38 }
39}
40
41declare module ChromeDebuggerCorePackage {
42 abstract class ChromeDebugAdapter {
43 protected _attachMode: boolean;
44 protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>;
45 }
46
47 interface IChromeDebugSessionOpts {
48 logFilePath?: string;
49 adapter: typeof ChromeDebugAdapter;
50 extensionName: string;
51 }
52
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 }
58}
59
60declare module Node2DebugAdapterPackage {
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
94 class Node2DebugAdapter extends ChromeDebuggerCorePackage.ChromeDebugAdapter {
95 protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>;
96 public setBreakpoints(args: any, requestSeq: number, ids?: number[]): Promise<ISetBreakpointsResponseBody>;
97 }
98}
99
100