@@ -205,12 +205,19 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
205205
206206 const filePath = args . source . path ;
207207 const fileUri = await convertClientPathToDebugger ( args . source . path , this . _namespace ) ;
208+ const [ , fileName ] = fileUri . match ( / \| ( [ ^ | ] + ) $ / ) ;
208209
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+ } ) ;
214221
215222 let xdebugBreakpoints : ( xdebug . ConditionalBreakpoint | xdebug . ClassLineBreakpoint | xdebug . LineBreakpoint ) [ ] = [ ] ;
216223 xdebugBreakpoints = await Promise . all (
@@ -230,6 +237,8 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
230237 }
231238 }
232239 } ) ;
240+ } else if ( filePath . endsWith ( "mac" ) || filePath . endsWith ( "int" ) ) {
241+ return new xdebug . RoutineLineBreakpoint ( fileUri , line , "" , line - 1 ) ;
233242 } else {
234243 return new xdebug . LineBreakpoint ( fileUri , line ) ;
235244 }
@@ -294,11 +303,12 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
294303 }
295304 } ) ;
296305 }
306+ const place = `${ stackFrame . method } +${ stackFrame . methodOffset } ` ;
297307 const stackFrameId = this . _stackFrameIdCounter ++ ;
298308 this . _stackFrames . set ( stackFrameId , stackFrame ) ;
299309 return {
300310 id : stackFrameId ,
301- name : source . name ,
311+ name : place ,
302312 source,
303313 line,
304314 column : 1 ,
0 commit comments