tamentis / rpdb

Wrapper around pdb allowing remote debugging via netcat or telnet. This is especially useful in a Tomcat/Jython environment where little debugging tools are available.
BSD 2-Clause "Simplified" License
130 stars 44 forks source link

Call to (c)ontinue raises an exception. #29

Open CodeGuro opened 4 years ago

CodeGuro commented 4 years ago

commit 18cd5a4364115ddc234cf74e093e3129edf3a0b5 caused a regression - closing the socket raises the following exception on a session. If you were to set a breakpoint, then on the first call to (c)ontinue the following exception shows the stack trace.

Traceback (most recent call last):
  File "/usr/lib/python2.7/bdb.py", line 49, in trace_dispatch
    return self.dispatch_line(frame)
  File "/usr/lib/python2.7/bdb.py", line 67, in dispatch_line
    self.user_line(frame)
  File "/usr/lib/python2.7/pdb.py", line 158, in user_line
    self.interaction(frame, None)
  File "/usr/lib/python2.7/pdb.py", line 210, in interaction
    self.cmdloop()
  File "/usr/lib/python2.7/cmd.py", line 135, in cmdloop
    self.stdout.flush()
  File "/usr/lib/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
AttributeError: 'NoneType' object has no attribute 'sendall'

I don't think your intention should be call shutdown() or close the socket on (c)ontinues.