summaryrefslogtreecommitdiff
path: root/Lib/idlelib/RemoteDebugger.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-01-25 21:33:40 +0000
committerKurt B. Kaiser <kbk@shore.net>2003-01-25 21:33:40 +0000
commitbc2861313cc53711d837a0e8a5bf303bf5291bf3 (patch)
tree3d778a44cb78b61adff76b42b70e5dd600aa7ec9 /Lib/idlelib/RemoteDebugger.py
parentcd5c8c2120b1de34cf0d0d04662248c77372bfdd (diff)
downloadcpython-git-bc2861313cc53711d837a0e8a5bf303bf5291bf3.tar.gz
M PyShell.py
M RemoteDebugger.py M rpc.py Fix the incorrect shell exception tracebacks generated when running under debugger control: 1. Use rpc.SocketIO.asynccall() instead of remotecall() to handle the IdbProxy.run() command. 2. Add a 'shell' attribute to RemoteDebugger.IdbProxy to allow setting of ModifiedInterpreter's active_seq attribute from RemoteDebugger code. 3. Cleanup PyShell.ModifiedInterpreter.runcode() and remove ambiguity regarding use of begin/endexecuting(). 4. In runcode() and cleanup_traceback() use 'console' instead of 'file' to denote the entity to which the exception traceback is printed. 5. Enhance cleanup_traceback() so if the traceback is pruned entirely away (the error is in IDLE internals) it will be displayed in its entirety instead. 6. ModifiedInterpreter.runcode() now prints ERROR RPC returns to both console and __stderr__. 7. Make a small tweak to the rpc.py debug messages.
Diffstat (limited to 'Lib/idlelib/RemoteDebugger.py')
-rw-r--r--Lib/idlelib/RemoteDebugger.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/idlelib/RemoteDebugger.py b/Lib/idlelib/RemoteDebugger.py
index 054b975485..41f910f45b 100644
--- a/Lib/idlelib/RemoteDebugger.py
+++ b/Lib/idlelib/RemoteDebugger.py
@@ -287,19 +287,21 @@ class GUIAdapter:
class IdbProxy:
- def __init__(self, conn, oid):
+ def __init__(self, conn, shell, oid):
self.oid = oid
self.conn = conn
+ self.shell = shell
def call(self, methodname, *args, **kwargs):
- ##print "call %s %s %s" % (methodname, args, kwargs)
+ ##print "**IdbProxy.call %s %s %s" % (methodname, args, kwargs)
value = self.conn.remotecall(self.oid, methodname, args, kwargs)
- ##print "return %s" % `value`
+ ##print "**IdbProxy.call %s returns %s" % (methodname, `value`)
return value
def run(self, cmd, locals):
# Ignores locals on purpose!
- self.call("run", cmd)
+ seq = self.conn.asynccall(self.oid, "run", (cmd,), {})
+ self.shell.interp.active_seq = seq
def get_stack(self, frame, tbid):
# passing frame and traceback IDs, not the objects themselves
@@ -352,7 +354,7 @@ def start_remote_debugger(rpcclt, pyshell):
idb_adap_oid = rpcclt.remotecall("exec", "start_the_debugger",\
(gui_adap_oid,), {})
- idb_proxy = IdbProxy(rpcclt, idb_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)