How to debug Twisted application?

Willy wilson_tam at yahoo.com
Tue Aug 24 10:06:43 CEST 2004


Hi,

I just started learning twisted and hit a big problem. How do I debug
my twisted server?

I wrote a test tcp server called 'tcpserver.py' using
twisted.application method. I start to debug it with 'twisted -b -y
tcpserver.py'. Server doesn't stop at any break point I set with the
'break' command at the (Pdb) prompt.

I also tried to add 'pdb.set_trace()' into my source code. This time,
debug session stops at the right place. But I can't see any SOURCE. I
did a '(Pdb) next'... same, not source listed. But the counter of the
line advance as normal:

(Pdb) n
> <string>(337)setStatus()
(Pdb) n
> <string>(338)setStatus()
(Pdb) n
> <string>(340)setStatus()

Can anyone help?

Thanks in advance.
Wil



More information about the Python-list mailing list