1+ import { DebugProtocol } from 'vscode-debugprotocol' ;
2+
3+ declare module 'vscode-debugprotocol' {
4+ namespace DebugProtocol {
5+ interface ILaunchRequestArgs extends DebugProtocol . LaunchRequestArguments {
6+ platform : string ;
7+ appRoot ?: string ;
8+ runtimeArgs ?: string [ ] ;
9+ runtimeExecutable ?: string ;
10+ stopOnEntry ?: boolean ;
11+ sourceMaps ?: boolean ;
12+ diagnosticLogging ?: boolean ;
13+ emulator ?:boolean ;
14+ request : string ;
15+ tnsArgs ?: string [ ] ;
16+ tnsOutput ?: string ;
17+ rebuild ?: boolean ;
18+ syncAllFiles ?: boolean ;
19+ nativescriptCliPath ?: string ;
20+ }
21+
22+ interface IAttachRequestArgs extends DebugProtocol . AttachRequestArguments {
23+ platform : string ;
24+ appRoot ?: string ;
25+ sourceMaps ?: boolean ;
26+ diagnosticLogging ?: boolean ;
27+ emulator ?:boolean ;
28+ request : string ;
29+ tnsArgs ?: string [ ] ;
30+ tnsOutput ?: string ;
31+ nativescriptCliPath ?: string ;
32+ }
33+
34+ interface ISetBreakpointsArgs extends DebugProtocol . SetBreakpointsArguments {
35+ /** DebugProtocol does not send cols, maybe it will someday, but this is used internally when a location is sourcemapped */
36+ cols ?: number [ ] ;
37+ authoredPath ?: string ;
38+ }
39+
40+ interface IBreakpoint extends DebugProtocol . Breakpoint {
41+ column ?: number ;
42+ }
43+
44+ /*
45+ * The ResponseBody interfaces are copied from debugProtocol.d.ts which defines these inline in the Response interfaces.
46+ * They should always match those interfaces, see the original for comments.
47+ */
48+ interface ISetBreakpointsResponseBody {
49+ breakpoints : IBreakpoint [ ] ;
50+ }
51+
52+ interface ISourceResponseBody {
53+ content : string ;
54+ }
55+
56+ interface IThreadsResponseBody {
57+ threads : DebugProtocol . Thread [ ] ;
58+ }
59+
60+ interface IStackTraceResponseBody {
61+ stackFrames : DebugProtocol . StackFrame [ ] ;
62+ }
63+
64+ interface IScopesResponseBody {
65+ scopes : DebugProtocol . Scope [ ] ;
66+ }
67+
68+ interface IVariablesResponseBody {
69+ variables : DebugProtocol . Variable [ ] ;
70+ }
71+
72+ interface IEvaluateResponseBody {
73+ result : string ;
74+ variablesReference : number ;
75+ }
76+
77+ type PromiseOrNot < T > = T | Promise < T > ;
78+
79+ interface IDebugAdapter {
80+ registerEventHandler ( eventHandler : ( event : DebugProtocol . Event ) => void ) : void ;
81+
82+ initialize ( args : DebugProtocol . InitializeRequestArguments ) : PromiseOrNot < DebugProtocol . Capabilities > ;
83+ launch ( args : ILaunchRequestArgs ) : PromiseOrNot < void > ;
84+ configurationDone ( args : DebugProtocol . ConfigurationDoneArguments ) : void ;
85+ disconnect ( ) : PromiseOrNot < void > ;
86+ attach ( args : IAttachRequestArgs ) : PromiseOrNot < void > ;
87+ setBreakpoints ( args : DebugProtocol . SetBreakpointsArguments ) : PromiseOrNot < ISetBreakpointsResponseBody > ;
88+ setExceptionBreakpoints ( args : DebugProtocol . SetExceptionBreakpointsArguments ) : PromiseOrNot < void > ;
89+
90+ continue ( ) : PromiseOrNot < void > ;
91+ next ( ) : PromiseOrNot < void > ;
92+ stepIn ( ) : PromiseOrNot < void > ;
93+ stepOut ( ) : PromiseOrNot < void > ;
94+ pause ( ) : PromiseOrNot < void > ;
95+
96+ stackTrace ( args : DebugProtocol . StackTraceArguments ) : PromiseOrNot < IStackTraceResponseBody > ;
97+ scopes ( args : DebugProtocol . ScopesArguments ) : PromiseOrNot < IScopesResponseBody > ;
98+ variables ( args : DebugProtocol . VariablesArguments ) : PromiseOrNot < IVariablesResponseBody > ;
99+ source ( args : DebugProtocol . SourceArguments ) : PromiseOrNot < ISourceResponseBody > ;
100+ threads ( ) : PromiseOrNot < IThreadsResponseBody > ;
101+ evaluate ( args : DebugProtocol . EvaluateArguments ) : PromiseOrNot < IEvaluateResponseBody > ;
102+ }
103+
104+ interface IDebugTransformer {
105+ initialize ?( args : DebugProtocol . InitializeRequestArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
106+ launch ?( args : ILaunchRequestArgs , requestSeq ?: number ) : PromiseOrNot < void > ;
107+ attach ?( args : IAttachRequestArgs , requestSeq ?: number ) : PromiseOrNot < void > ;
108+ setBreakpoints ?( args : DebugProtocol . SetBreakpointsArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
109+ setExceptionBreakpoints ?( args : DebugProtocol . SetExceptionBreakpointsArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
110+
111+ stackTrace ?( args : DebugProtocol . StackTraceArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
112+ scopes ?( args : DebugProtocol . ScopesArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
113+ variables ?( args : DebugProtocol . VariablesArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
114+ source ?( args : DebugProtocol . SourceArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
115+ evaluate ?( args : DebugProtocol . EvaluateArguments , requestSeq ?: number ) : PromiseOrNot < void > ;
116+
117+ setBreakpointsResponse ?( response : ISetBreakpointsResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
118+ stackTraceResponse ?( response : IStackTraceResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
119+ scopesResponse ?( response : IScopesResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
120+ variablesResponse ?( response : IVariablesResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
121+ sourceResponse ?( response : ISourceResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
122+ threadsResponse ?( response : IThreadsResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
123+ evaluateResponse ?( response : IEvaluateResponseBody , requestSeq ?: number ) : PromiseOrNot < void > ;
124+
125+ scriptParsed ?( event : DebugProtocol . Event ) ;
126+ }
127+ }
128+ }
0 commit comments