Is there a way to debug a Python script?


#1

Hi, we always stuck with the scripts we write and cant debug them, because we face those Oops interpreter messages.. may i ask, before falling to the error message, isnt there a way of going on line by line, or at least to put a breakpoint and see what is what at that point? How can we debug our Python scripts?

Thank you..


#2

there must be tools, gdb is common for C, and python is written in C, so yea, seems possible:

https://wiki.python.org/moin/DebuggingWithGdb

I usually debug using the interpreter error messages, they are quit useful. You can also learn try/except to catch errors, and let the rest of your code run


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.