def remote_pdb_handler(signum, frame):
try:<EOL><INDENT>from remote_pdb import RemotePdb<EOL>rdb = RemotePdb(host="<STR_LIT:127.0.0.1>", port=<NUM_LIT:0>)<EOL>rdb.set_trace(frame=frame)<EOL><DEDENT>except ImportError:<EOL><INDENT>log.warning(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>signal.signal(signum, remote_pdb_handler)<EOL>
Handler to drop us into a remote debugger upon receiving SIGUSR1