new_contents: import traceback
  import sys
  import code
  
  
  def debug():
      type, value, tb = sys.exc_info()
      traceback.print_exc()
      last_frame = lambda tb=tb: last_frame(tb.tb_next) if tb.tb_next else tb
      frame = last_frame().tb_frame
      ns = dict(frame.f_globals)
      ns.update(frame.f_locals)
      code.interact(local=ns)
  
subject: Add helper for handling debugging