code: def debugfile(filename, args=None, wdir=None, post_mortem=False):
      
      debugger = pdb.Pdb()
      filename = debugger.canonic(filename)
      debugger._wait_for_mainpyfile = 1
      debugger.mainpyfile = filename
      debugger._user_requested_quit = 0
      if os.name == 'nt':
          filename = filename.replace('\\', '/')
      debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))
docs: Debug filename
      args: command line arguments (string)
      wdir: working directory
      post_mortem: boolean, included for compatiblity with runfile