thread debugging
Kevin Cazabon
kevin at cazabon.com
Fri Aug 15 13:56:46 EDT 2003
Two solutions I can see:
1) at the end of your main script... don't exit. use "while 1:
pass". That'll keep the main script running so you can debug normally
2) output a log file from each thread (log before and after each
significant event)
Kevin.
Robert Hayes <robert.hayes at havok.com> wrote in message news:<bhip98$sc8$1 at reader-00.news.insnet.cw.net>...
> Hi,
> This may well be a very stupid question, but I'll ask it anyway:
>
> I have a script that uses Thread classes. All it does (when called as a
> __main__ script) is initialise the classes and start() them. Then it exits.
>
> The problem is that I can't debug those threads with a standard debugger
> (I'm using PythonWin 157 btw), because the script has already exited!
> (even though the threads are still running). So any breakpoints I set
> are ignored...
>
> My question is thus: is impossible to debug this threaded code, or is
> there some way that I can? (preferable using pythonwin; sorry, my *nix
> friends, but I am confined to windows for this one ;))
>
> thanks,
> ~Rob
More information about the Python-list
mailing list