411 |
411 |
412 def __checkBreakInFrame(self, frame): |
412 def __checkBreakInFrame(self, frame): |
413 """ |
413 """ |
414 Private method to check if the function / method has a line number |
414 Private method to check if the function / method has a line number |
415 which is a breakpoint. |
415 which is a breakpoint. |
|
416 |
416 @param frame the frame object |
417 @param frame the frame object |
417 @type frame object |
418 @type frame object |
418 @return Flag indicating a function / method with breakpoint |
419 @return Flag indicating a function / method with breakpoint |
419 @rtype bool |
420 @rtype bool |
420 """ |
421 """ |
423 frame.f_globals.get('__file__'), |
424 frame.f_globals.get('__file__'), |
424 frame.f_code.co_firstlineno] |
425 frame.f_code.co_firstlineno] |
425 except KeyError: |
426 except KeyError: |
426 filename = self.fix_frame_filename(frame) |
427 filename = self.fix_frame_filename(frame) |
427 if filename not in Breakpoint.breakInFile: |
428 if filename not in Breakpoint.breakInFile: |
428 Breakpoint.breakInFrameCache[frame.f_globals.get('__file__'), |
429 Breakpoint.breakInFrameCache[ |
|
430 frame.f_globals.get('__file__'), |
429 frame.f_code.co_firstlineno] = False |
431 frame.f_code.co_firstlineno] = False |
430 return False |
432 return False |
431 lineNo = frame.f_code.co_firstlineno |
433 lineNo = frame.f_code.co_firstlineno |
432 lineNumbers = [lineNo] |
434 lineNumbers = [lineNo] |
433 # No need to handle special case if a lot of lines between |
435 # No need to handle special case if a lot of lines between |
440 if bp in lineNumbers: |
442 if bp in lineNumbers: |
441 Breakpoint.breakInFrameCache[ |
443 Breakpoint.breakInFrameCache[ |
442 frame.f_globals.get('__file__'), |
444 frame.f_globals.get('__file__'), |
443 frame.f_code.co_firstlineno] = True |
445 frame.f_code.co_firstlineno] = True |
444 return True |
446 return True |
445 Breakpoint.breakInFrameCache[frame.f_globals.get('__file__'), |
447 Breakpoint.breakInFrameCache[ |
|
448 frame.f_globals.get('__file__'), |
446 frame.f_code.co_firstlineno] = False |
449 frame.f_code.co_firstlineno] = False |
447 return False |
450 return False |
448 |
451 |
449 def break_here(self, frame): |
452 def break_here(self, frame): |
450 """ |
453 """ |