Applying winpdb_reborn
Cameron Simpson
cs at cskk.id.au
Sat May 29 19:03:18 EDT 2021
On 29May2021 09:51, Rich Shepard <rshepard at appl-ecosys.com> wrote:
>I've removed winpdb here as recommended by Philippe Fremy. I don't use
>IDEs other than emacs so I'll stick with pdb.
>
>What I find interesting is that every web page I find on 'using pdb' does no
>more than explain the available commands; they don't explain the debugging
>process. That's like showing someone what the word processor menus do; it
>doesn't teach the user how to be a writer.
>
>I knew the debugging process with Fortran and C, but haven't learned how to
>effectively use pdb to find bugs that don't issue a traceback or obvious
>wrong answer such as my module displaying an empty window with no
>widgets.
I've only just started with pdb. As of Python 3.7 there's a builtin
function named breakpoint() which drops you into the debugger. I've
never been a big debugger person, historicly using print() and
equivalent. However, this makes it very easy to insert this call into a
piece of code instead of having to invoke one's pogramme in a special
way.
I'd imagine debugging is much like it is in C. Wait for the breakpoint
to trip, then inspect the programme variables.
In your example above I'd blithely imagine checking that the list of
widgets I expected were in fact constructed, etc. But I'd also be
littering my window setup with progress print calls :-)
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Python-list
mailing list