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

adding post_mortem, similar to pdb #12

Closed CamDavidsonPilon closed 9 years ago

CamDavidsonPilon commented 9 years ago

@tamentis, I was having difficulty debugging a Spark job locally, and my friend pointed to your repo. My Spark job was throwing an exception inside some library on the worker node, so set_trace wasn't enough. I added this post_mortem function, and got great results! The work flow was:

import external_lib

def some_function_on_worker_node():
   import rpdb
   try:
     external_lib.failing_func()
  except:
      rpdb.post_mortem()

and nc 127.0.0.1 4444 got me right into the library's broken parts.

Thanks for this little library!

tamentis commented 9 years ago

Thanks for this update, very useful. I didn't even know about pdb.post_mortem().