def launch_debugger(frame, stream=None):
d = {'<STR_LIT>': frame}  <EOL>d.update(frame.f_globals)  <EOL>d.update(frame.f_locals)<EOL>import code, traceback<EOL>i = code.InteractiveConsole(d)<EOL>message = "<STR_LIT>"<EOL>message += '<STR_LIT>'.join(traceback.format_stack(frame))<EOL>i.interact(message)<EOL>
Interrupt running process, and provide a python prompt for
interactive debugging.