@@ -205,12 +205,19 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
205
205
206
206
const filePath = args . source . path ;
207
207
const fileUri = await convertClientPathToDebugger ( args . source . path , this . _namespace ) ;
208
+ const [ , fileName ] = fileUri . match ( / \| ( [ ^ | ] + ) $ / ) ;
208
209
209
- // const currentList = (await this._connection.sendBreakpointListCommand()).breakpoints.filter(breakpoint => {
210
- // if (breakpoint instanceof xdebug.LineBreakpoint) {
211
- // return breakpoint.fileUri === fileUri;
212
- // }
213
- // });
210
+ const currentList = await this . _connection . sendBreakpointListCommand ( ) ;
211
+ currentList . breakpoints
212
+ . filter ( breakpoint => {
213
+ if ( breakpoint instanceof xdebug . LineBreakpoint ) {
214
+ return breakpoint . fileUri === fileName ;
215
+ }
216
+ return false ;
217
+ } )
218
+ . map ( breakpoint => {
219
+ this . _connection . sendBreakpointRemoveCommand ( breakpoint ) ;
220
+ } ) ;
214
221
215
222
let xdebugBreakpoints : ( xdebug . ConditionalBreakpoint | xdebug . ClassLineBreakpoint | xdebug . LineBreakpoint ) [ ] = [ ] ;
216
223
xdebugBreakpoints = await Promise . all (
@@ -230,6 +237,8 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
230
237
}
231
238
}
232
239
} ) ;
240
+ } else if ( filePath . endsWith ( "mac" ) || filePath . endsWith ( "int" ) ) {
241
+ return new xdebug . RoutineLineBreakpoint ( fileUri , line , "" , line - 1 ) ;
233
242
} else {
234
243
return new xdebug . LineBreakpoint ( fileUri , line ) ;
235
244
}
@@ -294,11 +303,12 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
294
303
}
295
304
} ) ;
296
305
}
306
+ const place = `${ stackFrame . method } +${ stackFrame . methodOffset } ` ;
297
307
const stackFrameId = this . _stackFrameIdCounter ++ ;
298
308
this . _stackFrames . set ( stackFrameId , stackFrame ) ;
299
309
return {
300
310
id : stackFrameId ,
301
- name : source . name ,
311
+ name : place ,
302
312
source,
303
313
line,
304
314
column : 1 ,
0 commit comments