def set_break(self, filename, lineno, temporary=False, cond=None, funcname=None): filename = self.canonic(filename) list = self.breaks.setdefault(filename, []) if lineno not in list: list.append(lineno) bp = bdb.Breakpoint(filename, lineno, temporary, cond, funcname)
def set_break(self, filename, lineno, temporary=0, cond=None): import linecache # Import as late as possible line = linecache.getline(filename, lineno) if not line: return 'That line does not exist!' if not self.breaks.has_key(filename): self.breaks[filename] = [] list = self.breaks[filename] if not lineno in list: list.append(lineno) bp = bdb.Breakpoint(filename, lineno, temporary, cond)
def set_watch(self, cond, temporary=0): """ Public method to set a watch expression. @param cond expression of the watch expression (string) @param temporary flag indicating a temporary watch expression (boolean) """ bp = bdb.Breakpoint("Watch", 0, temporary, cond) if cond.endswith('??created??') or cond.endswith('??changed??'): bp.condition, bp.special = cond.split() else: bp.condition = cond bp.special = "" bp.values = {} if "Watch" not in self.breaks: self.breaks["Watch"] = 1 else: self.breaks["Watch"] += 1
import os
def set_break(self, filename, lineno, temporary=0, cond=None): filename = self.canonic(filename) self.set_internal_breakpoint(filename, lineno, temporary, cond) # Note that we can't reliably verify a filename anymore. return bdb.Breakpoint(filename, lineno, temporary, cond)