DEBUGGER question
al at servana.com
al at servana.com
Tue Jun 6 17:52:48 EDT 2000
Hello!
I have read the pdb docs and can use PDB with python script functions
just fine.
But, how do you use PDB with an 'executable' python script which
uses a MAIN()?
When I have a script with N functions, I can use pdb.run to debug any
of the functions separately.
When I have a script with a MAIN that is envoked when you 'execute
the script' (like: python scriptname.py -a -b -c arg1 arg2)
I cannot find a way to get it 'in' to PDB.
If I try pdb.run('scriptname.main()') it does not actually execute
the script.
I tried pdb.runcall also, and also used the __main__ notataion -
still no go.
If you look at the WEBCHECKER scripts which come with python, you can
see scripts which are setup to be 'executed'.
I really want to peek inside some functions while running the script
to see what is going on. (like 'addroot' in the Checker class of
WEBCHECKER)
Any help would be appreciated,
Al G
More information about the Python-list
mailing list