Ejemplo n.º 1
0
 def breakpoints_for_file(self, filename):
     views = list(util.views_for_file(filename))
     if len(views) > 0:
         view = views[0]
         regions = view.get_regions("debug_breakpoint")
         line_numbers = [util.line_number_for_region(view, r) for r in regions]
         return line_numbers
     else:
         return self._load_for_file(filename)
Ejemplo n.º 2
0
 def breakpoints_for_file(self, filename):
     views = list(util.views_for_file(filename))
     if len(views) > 0:
         view = views[0]
         regions = view.get_regions("debug_breakpoint")
         line_numbers = [
             util.line_number_for_region(view, r) for r in regions
         ]
         return line_numbers
     else:
         return self._load_for_file(filename)
Ejemplo n.º 3
0
    def run(self, edit):
        # no breakpoints if file isn't saved on disk
        filename = self.view.file_name()
        if filename is None:
            return

        line_numbers = [util.line_number_for_region(self.view, r) for r in self.view.sel()]
        for line_number in line_numbers:
            debugger.toggle_breakpoint(filename, line_number)

        for view in util.views_for_file(filename):
            debugger.draw_breakpoints(view)
Ejemplo n.º 4
0
    def run(self, edit):
        # no breakpoints if file isn't saved on disk
        filename = self.view.file_name()
        if filename is None:
            return

        line_numbers = [
            util.line_number_for_region(self.view, r) for r in self.view.sel()
        ]
        for line_number in line_numbers:
            debugger.toggle_breakpoint(filename, line_number)

        for view in util.views_for_file(filename):
            debugger.draw_breakpoints(view)