idlelib.RemoteDebugger
index
/usr/local/lib/python2.3/idlelib/RemoteDebugger.py

Support for remote Python debugging.
 
Some ASCII art to describe the structure:
 
       IN PYTHON SUBPROCESS          #             IN IDLE PROCESS
                                     #
                                     #        oid='gui_adapter'
                 +----------+        #       +------------+          +-----+
                 | GUIProxy |--remote#call-->| GUIAdapter |--calls-->| GUI |
+-----+--calls-->+----------+        #       +------------+          +-----+
| Idb |                               #                             /
+-----+<-calls--+------------+         #      +----------+<--calls-/
                | IdbAdapter |<--remote#call--| IdbProxy |
                +------------+         #      +----------+
                oid='idb_adapter'      #
 
The purpose of the Proxy and Adapter classes is to translate certain
arguments and return values that cannot be transported through the RPC
barrier, in particular frame and traceback objects.

 
Modules
       
idlelib.Debugger
idlelib.rpc
sys
types

 
Classes
       
CodeProxy
DictProxy
FrameProxy
GUIAdapter
GUIProxy
IdbAdapter
IdbProxy

 
class CodeProxy
     Methods defined here:
__getattr__(self, name)
__init__(self, conn, oid, cid)

 
class DictProxy
     Methods defined here:
__getattr__(self, name)
__getitem__(self, key)
__init__(self, conn, oid, did)
keys(self)

 
class FrameProxy
     Methods defined here:
__getattr__(self, name)
__init__(self, conn, fid)

 
class GUIAdapter
     Methods defined here:
__init__(self, conn, gui)
interaction(self, message, fid, modified_info)

 
class GUIProxy
     Methods defined here:
__init__(self, conn, gui_adap_oid)
interaction(self, message, frame, info=None)

 
class IdbAdapter
     Methods defined here:
__init__(self, idb)
clear_all_file_breaks(self, filename)
clear_break(self, filename, lineno)
code_filename(self, cid)
code_name(self, cid)
dict_item(self, did, key)
dict_keys(self, did)
frame_attr(self, fid, name)
frame_code(self, fid)
frame_globals(self, fid)
frame_locals(self, fid)
get_stack(self, fid, tbid)
run(self, cmd)
set_break(self, filename, lineno)
set_continue(self)
set_next(self, fid)
set_quit(self)
set_return(self, fid)
set_step(self)

 
class IdbProxy
     Methods defined here:
__init__(self, conn, shell, oid)
call(self, methodname, *args, **kwargs)
clear_all_file_breaks(self, filename)
clear_break(self, filename, lineno)
get_stack(self, frame, tbid)
run(self, cmd, locals)
set_break(self, filename, lineno)
set_continue(self)
set_next(self, frame)
set_quit(self)
set_return(self, frame)
set_step(self)

 
Functions
       
close_remote_debugger(rpcclt)
Shut down subprocess debugger and Idle side of debugger RPC link
 
Request that the RPCServer shut down the subprocess debugger and link.
Unregister the GUIAdapter, which will cause a GC on the Idle process
debugger and RPC link objects.  (The second reference to the debugger GUI
is deleted in PyShell.close_remote_debugger().)
close_subprocess_debugger(rpcclt)
restart_subprocess_debugger(rpcclt)
start_debugger(rpchandler, gui_adap_oid)
Start the debugger and its RPC link in the Python subprocess
 
Start the subprocess side of the split debugger and set up that side of the
RPC link by instantiating the GUIProxy, Idb debugger, and IdbAdapter
objects and linking them together.  Register the IdbAdapter with the
RPCServer to handle RPC requests from the split debugger GUI via the
IdbProxy.
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.
wrap_frame(frame)
wrap_info(info)
replace info[2], a traceback instance, by its ID

 
Data
        codetable = {}
debugging = 0
dicttable = {}
frametable = {}
gui_adap_oid = 'gui_adapter'
idb_adap_oid = 'idb_adapter'
tracebacktable = {}