Set a new breakpoint for filename:lineno. If lineno doesn't exist for the filename, return an error message. The filename should be in canonical form.
(self, filename, lineno, temporary=False, cond=None,
funcname=None)
| 374 | bp_linenos.append(lineno) |
| 375 | |
| 376 | def set_break(self, filename, lineno, temporary=False, cond=None, |
| 377 | funcname=None): |
| 378 | """Set a new breakpoint for filename:lineno. |
| 379 | |
| 380 | If lineno doesn't exist for the filename, return an error message. |
| 381 | The filename should be in canonical form. |
| 382 | """ |
| 383 | filename = self.canonic(filename) |
| 384 | import linecache # Import as late as possible |
| 385 | line = linecache.getline(filename, lineno) |
| 386 | if not line: |
| 387 | return 'Line %s:%d does not exist' % (filename, lineno) |
| 388 | self._add_to_breaks(filename, lineno) |
| 389 | bp = Breakpoint(filename, lineno, temporary, cond, funcname) |
| 390 | return None |
| 391 | |
| 392 | def _load_breaks(self): |
| 393 | """Apply all breakpoints (set in other instances) to this one. |
no test coverage detected