@@ -179,11 +179,22 @@ export class IosConnection implements INSDebugConnection {
179
179
}
180
180
181
181
public debugger_setBreakpoint ( location : WebKitProtocol . Debugger . Location , condition ?: string ) : Promise < WebKitProtocol . Debugger . SetBreakpointResponse > {
182
- return this . sendMessage ( 'Debugger.setBreakpoint' , < WebKitProtocol . Debugger . SetBreakpointParams > { location, options : { condition : condition } } ) ;
182
+ return < Promise < WebKitProtocol . Debugger . SetBreakpointResponse > > ( this . sendMessage ( 'Debugger.setBreakpoint' , < WebKitProtocol . Debugger . SetBreakpointParams > {
183
+ location,
184
+ options : { condition }
185
+ } ) ) ;
183
186
}
184
187
185
188
public debugger_setBreakpointByUrl ( url : string , lineNumber : number , columnNumber : number , condition : string , ignoreCount : number ) : Promise < WebKitProtocol . Debugger . SetBreakpointByUrlResponse > {
186
- return this . sendMessage ( 'Debugger.setBreakpointByUrl' , < WebKitProtocol . Debugger . SetBreakpointByUrlParams > { url : url , lineNumber : lineNumber , columnNumber : 0 /* a columnNumber different from 0 confuses the debugger */ , options : { condition : condition , ignoreCount : ignoreCount } } ) ;
189
+ return < Promise < WebKitProtocol . Debugger . SetBreakpointByUrlResponse > > ( this . sendMessage ( 'Debugger.setBreakpointByUrl' , < WebKitProtocol . Debugger . SetBreakpointByUrlParams > {
190
+ url,
191
+ lineNumber,
192
+ columnNumber : 0 /* a columnNumber different from 0 confuses the debugger */ ,
193
+ options : {
194
+ condition,
195
+ ignoreCount
196
+ }
197
+ } ) ) ;
187
198
}
188
199
189
200
public debugger_removeBreakpoint ( breakpointId : string ) : Promise < WebKitProtocol . Response > {
@@ -211,23 +222,37 @@ export class IosConnection implements INSDebugConnection {
211
222
}
212
223
213
224
public debugger_evaluateOnCallFrame ( callFrameId : string , expression : string , objectGroup = 'dummyObjectGroup' , returnByValue ?: boolean ) : Promise < WebKitProtocol . Debugger . EvaluateOnCallFrameResponse > {
214
- return this . sendMessage ( 'Debugger.evaluateOnCallFrame' , < WebKitProtocol . Debugger . EvaluateOnCallFrameParams > { callFrameId, expression, objectGroup, returnByValue } ) ;
225
+ return < Promise < WebKitProtocol . Debugger . EvaluateOnCallFrameResponse > > ( this . sendMessage ( 'Debugger.evaluateOnCallFrame' , < WebKitProtocol . Debugger . EvaluateOnCallFrameParams > {
226
+ callFrameId,
227
+ expression,
228
+ objectGroup,
229
+ returnByValue
230
+ } ) ) ;
215
231
}
216
232
217
233
public debugger_setPauseOnExceptions ( state : string ) : Promise < WebKitProtocol . Response > {
218
234
return this . sendMessage ( 'Debugger.setPauseOnExceptions' , < WebKitProtocol . Debugger . SetPauseOnExceptionsParams > { state } ) ;
219
235
}
220
236
221
237
public debugger_getScriptSource ( scriptId : WebKitProtocol . Debugger . ScriptId ) : Promise < WebKitProtocol . Debugger . GetScriptSourceResponse > {
222
- return this . sendMessage ( 'Debugger.getScriptSource' , < WebKitProtocol . Debugger . GetScriptSourceParams > { scriptId } ) ;
238
+ return < Promise < WebKitProtocol . Debugger . GetScriptSourceResponse > > ( this . sendMessage ( 'Debugger.getScriptSource' , < WebKitProtocol . Debugger . GetScriptSourceParams > { scriptId } ) ) ;
223
239
}
224
240
225
241
public runtime_getProperties ( objectId : string , ownProperties : boolean , accessorPropertiesOnly : boolean ) : Promise < WebKitProtocol . Runtime . GetPropertiesResponse > {
226
- return this . sendMessage ( 'Runtime.getProperties' , < WebKitProtocol . Runtime . GetPropertiesParams > { objectId, ownProperties, accessorPropertiesOnly } ) ;
242
+ return < Promise < WebKitProtocol . Runtime . GetPropertiesResponse > > ( this . sendMessage ( 'Runtime.getProperties' , < WebKitProtocol . Runtime . GetPropertiesParams > {
243
+ objectId,
244
+ ownProperties,
245
+ accessorPropertiesOnly
246
+ } ) ) ;
227
247
}
228
248
229
249
public runtime_evaluate ( expression : string , objectGroup = 'dummyObjectGroup' , contextId ?: number , returnByValue = false ) : Promise < WebKitProtocol . Runtime . EvaluateResponse > {
230
- return this . sendMessage ( 'Runtime.evaluate' , < WebKitProtocol . Runtime . EvaluateParams > { expression, objectGroup, contextId, returnByValue } ) ;
250
+ return < Promise < WebKitProtocol . Runtime . EvaluateResponse > > ( this . sendMessage ( 'Runtime.evaluate' , < WebKitProtocol . Runtime . EvaluateParams > {
251
+ expression,
252
+ objectGroup,
253
+ contextId,
254
+ returnByValue
255
+ } ) ) ;
231
256
}
232
257
233
258
private sendMessage ( method : string , params ?: any ) : Promise < WebKitProtocol . Response > {
0 commit comments