Ejemplo n.º 1
0
 def handle_line(self, device, filename, line, args):
     """
 
     """
     try:
         area = get_opened_files()[filename]
     except KeyError:
         pass
     else:
         set_line(area, line)
Ejemplo n.º 2
0
Archivo: debug.py Proyecto: yutzhead/vy
 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)        
Ejemplo n.º 3
0
Archivo: debug.py Proyecto: yutzhead/vy
    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)
Ejemplo n.º 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)