Beispiel #1
0
 def handle_line(self, device, filename, line, args):
     """
 
     """
     try:
         area = get_opened_files()[filename]
     except KeyError:
         pass
     else:
         set_line(area, line)
Beispiel #2
0
 def delete_all_breakpoints(self):
     """
     It deletes all added breakpoint tags.
     It is useful when restarting pdb as a different process.
     """
 
     for index, (filename, line) in self.map_index.iteritems():
         try:
             area = get_opened_files()[filename]
         except KeyError:
             pass
         else:
             NAME = '_breakpoint_%s' % index
             area.tag_delete(NAME)        
Beispiel #3
0
    def handle_deleted_breakpoint(self, device, index):
        """
        When a break point is removed.
        """

        filename, line = self.map_index[index]
        NAME           = '_breakpoint_%s' % index
        area           = None

        try:
            area = get_opened_files()[filename]
        except KeyError:
            return

        area.tag_delete(NAME)
Beispiel #4
0
    def handle_breakpoint(self, device, index, filename, line):
        """
        When a break point is added.
        """

        self.map_index[index] = (filename, line)
        self.map_line[(filename, line)] = index
        map = get_opened_files()

        area = map[filename]

        NAME = '_breakpoint_%s' % index
        area.tag_add(NAME, '%s.0 linestart' % line, '%s.0 lineend' % line)

        area.tag_config(NAME, **self.setup)