Debugging
R. Bernstein
rocky at panix.com
Mon Oct 23 12:59:12 EDT 2006
Fulvio <fulvio at tm.net.my> writes:
> The previous post I might have missed some explaination on my proceeding. I'd
> say that I'm testing a small program under pdb control
> (python /usr/lib/python2.4/pdb.py ./myprog.py). So pdb will load myprog and
> stop the first line code.
> Once I'm at the pdb command line I can issue the commands available inside the
> pdb itself.
Okay.
There's one other pydb command might be of interest. I mentioned the
ability to issue debugger commands by giving the commands as a string
in a command-line option, or putting the debugger commands in a file
and giving the name of a file in a command-line option. However
*inside* pydb, one can also run a canned set of debugger commands read
in from a file. This is "source" command. Again, this is exactly
analogous the command of the same name in gdb.
Should you want to somehow build such a debugger script from an
interactive debugging session, "set history" and "set logging" might
be helpful.
More information about the Python-list
mailing list