Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions for Python debugging tools? [closed]

Yesterday I made a simulation using Python. I had a few difficulties with variables and debugging.

Is there any software for Python, which provides a decent debugger?

Related question: What is the best way to debug my Python code?

like image 331
Léo Léopold Hertz 준영 Avatar asked Jan 25 '09 05:01

Léo Léopold Hertz 준영


People also ask

How do I debug Python without IDE?

Directly use command python pdg-debug.py without -m pdb to run the code. The program will automatically break at the position of pdb. set_trace() and enter the pdb debugging environment. You can use the command p variable to view the variables or use the command c to continue to run.

Why do you need a debugging tool when using Python?

For a larger program, we may not want to step through the code from the beginning as it may take a long time before we reach the line that we are interested in. Therefore, debuggers also provide a breakpoint feature that will kick in when a specific line of code is reached.

Is Python difficult to debug?

But when it comes to Python, debugging “out of the box” is a little bit cruder and primitive; single-step debugging is the main way to debug Python code, and is quite slow and clunky. It's just easier to use print statements; Python founder Guido van Rossum (reportedly) uses them for 90 percent of his debugging.


2 Answers

Winpdb is a platform independent graphical GPL Python debugger with support for remote debugging over a network, multiple threads, namespace modification, embedded debugging, encrypted communication and is up to 20 times faster than pdb.

Features:

  • GPL license. Winpdb is Free Software.
  • Compatible with CPython 2.3 through 2.6 and Python 3000
  • Compatible with wxPython 2.6 through 2.8
  • Platform independent, and tested on Ubuntu Gutsy and Windows XP.
  • User Interfaces: rpdb2 is console based, while winpdb requires wxPython 2.6 or later.

Screenshot
(source: winpdb.org)

like image 187
nosklo Avatar answered Oct 01 '22 06:10

nosklo


pudb is a visual debugger for python.

pudb screenshot

like image 28
miku Avatar answered Oct 01 '22 04:10

miku