How to debug Twisted application?

W

Willy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,204
Messages
2,571,063
Members
47,670
Latest member
micheljon

Latest Threads

Top