0

I came across a list of Python editors and a list of features here: What IDE to use for Python?

Among those features were "Integrated Python Debugging". As I'm trying to decide on a text editor to use, I thought I'd look it up, because I don't know what debugging is more than "fixing bugs". That left me none the wiser however, so now I'm asking: as a beginner with Python, how will having this feature in a text editor affect me?

Community
  • 1
  • 1
H.v.M.
  • 1,348
  • 3
  • 16
  • 42
  • Debugging will change your life as a programmer, look it up. – Lanaru Oct 11 '12 at 01:06
  • I found that many programmers don't use debuggers and I just can't see why, it makes life much easier, especially in interpreted languages like Perl and Python where you can execute new code while debugging. – Bitwise Oct 11 '12 at 01:10

4 Answers4

3

With a debugger you can pause your program at various points and inspect what the values of your different variables are. A debugger allows you to slowly "step" through your program and verify that the code is doing what you expect it too.

Here's an article about debugging with Eclipse and PyDev.

Nathan Villaescusa
  • 17,331
  • 4
  • 53
  • 56
0

Adding these lines to your python code will insert a break point int your code

import pdb
pdb.set_trace()

then you can use the normal pdb commands s = step, n = next w = where etc.

Jeff Sheffield
  • 5,768
  • 3
  • 25
  • 32
0

I suggest to read this (if you use Emacs or Vim is the best):

Very clear and usefull!

PDB has similar comands of the GDB used in C.

If you prefer to use an IDE, there is a part in the beginning that could help you.

Kyrol
  • 3,475
  • 7
  • 34
  • 46
0

With a debugger you can get better understanding of programming language constructs as it can show you how each construct affects interpreter's steps through the code. This kind of program runtime visualization is the main feature in beginners' IDE Thonny (http://thonny.org)

Aivar
  • 6,814
  • 5
  • 46
  • 78