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)))

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 ) ) )
debug filename args: command line arguments wdir: working directory post_mortem: boolean .