Thanks to both of you. While I am not getting as much information from
pdb as I get from an error traceback, I suspect that it is my fault
and I will figure out how to get more. I will definitely look at
setting breakpoints in the event handlers (every event is fired by a
keystroke controled in an accelerator table). It is one of those
problems that is hard to track down since it seems to happen randomly,
though there is, of course, some set of circumstances causing the
problem that I cannot figure out. I will get it eventually...
hopefully!

On 1/4/11, Alan Gauld <[email protected]> wrote:
>
> "Alex Hall" <[email protected]> wrote
>
>> expected at all. I tried the pdb module, but I am running a wx
>> program
>> so it is not helping. I tried:
>> python -m pdb c:\prog\solitaire\game.py
>
> The key to using any debugger in a GUI environment is to set break
> points on the event handlers of interest. Then when the event fires
> the debugger will stop your code at the start of the event handler
> and you can examine the stack, variables etc and step through
> the code.
>
> Single line stepping is tiresome so usually you are better off
> setting another break point within the function (just before or within
> a loop maybe? Or after reading a line from a file...). A watch point
> is even better but sadly I don't think pdb supports those. But
> the debugger in Eclipse and winPDB(?) do I think.
>
> And of course print statements work too within the console
> window.
>
> HTH,
>
> Alan G.
>
>
> _______________________________________________
> Tutor maillist  -  [email protected]
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


-- 
Have a great day,
Alex (msg sent from GMail website)
[email protected]; http://www.facebook.com/mehgcap
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to