Exemplo n.º 1
0
 def open_debugger(self):
     if self.interp.rpcclt:
         dbg_gui = debugger_r.start_remote_debugger(self.interp.rpcclt,
                                                    self)
     else:
         dbg_gui = debugger.Debugger(self)
     self.interp.setdebugger(dbg_gui)
     dbg_gui.load_breakpoints()
     sys.ps1 = '[DEBUG ON]\n>>> '
     self.showprompt()
     self.set_debugger_indicator()
Exemplo n.º 2
0
def start_remote_debugger(rpcclt, pyshell):
    """Start the subprocess debugger, initialize the debugger GUI and RPC link

    Request the RPCServer start the Python subprocess debugger and link.  Set
    up the Idle side of the split debugger by instantiating the IdbProxy,
    debugger GUI, and debugger GUIAdapter objects and linking them together.

    Register the GUIAdapter with the RPCClient to handle debugger GUI
    interaction requests coming from the subprocess debugger via the GUIProxy.

    The IdbAdapter will pass execution and environment requests coming from the
    Idle debugger GUI to the subprocess debugger via the IdbProxy.

    """
    global idb_adap_oid
    idb_adap_oid = rpcclt.remotecall('exec', 'start_the_debugger',
                                     (gui_adap_oid, ), {})
    idb_proxy = IdbProxy(rpcclt, pyshell, idb_adap_oid)
    gui = debugger.Debugger(pyshell, idb_proxy)
    gui_adap = GUIAdapter(rpcclt, gui)
    rpcclt.register(gui_adap_oid, gui_adap)
    return gui