def continue_till_line(): """ Continue executing the debuggee until it reaches the current editor line. If this line is never reached, the debugger will not stop. """ context = current_context() try: debug = Debugger.get() debug.send("tbreak %s:%s" % (context.file().path, context.location().line())) debug.send("cont") except: pass # No debugger active
def add_breakpoint_exception(): context = current_context() global autocont_br # Only consider base names of files, since the debugger does not always # show the full name in the "frame" command f = "%s:%s" % (os.path.basename( context.file().path), context.location().line()) if f in autocont_br: autocont_br.remove(f) else: autocont_br.add(f) if Preference("Plugins/debugger/save_autocont_br").get(): Project.root().set_property("autocont_br", "--".join(autocont_br), True)
def display_full_name_run(): context = current_context() Debugger.get().send("graph display " + context.entity().full_name(), show_in_console=True)
def print_as_dec_run(): context = current_context() Debugger.get().send("print/d " + context.entity().name(), show_in_console=True)
def on_view_all(): context = current_context() hist = LocalHistory(context.file()) hist.view_all(context.revisions, context.revisions_menu)