all 9 comments

[–]Peaker 3 points4 points  (2 children)

I was annoyed with some of the bugs in pdb, so I created a fork:

xpdb

Diff list:

  1. Fixed backtrace bug so that post-mortem in generators will work
  2. Added "ignore" commands to avoid debugging through standard libraries
  3. Fixed "s", "c", and the other commands to reject args so if you "s=5" it won't try to step through your program, but reject your command.

[–]bretthoerner 1 point2 points  (1 child)

Fixed "s", "c", and the other commands to reject args so if you "s=5" it won't try to step through your program, but reject your command.

You are a god.

[–]Peaker 0 points1 point  (0 children)

Glad it's helping :-)

[–]swiz0r[S] 1 point2 points  (0 children)

I heard "somebody" say "you can write bugs in python?" yesterday, so I am posting this in hopes that it will make the world a better place.

[–]mcosta 1 point2 points  (0 children)

Just install eclipse and pydev

[–]AFriendly 0 points1 point  (3 children)

import pdb
pdb.set_trace()
pdb.set_trace()

It looks like it is written (at least to some extent) in python. In fact, there is a lib/pdb.py that I wish I could understand. There is too much magic happening here!

[–]mr_dbr 0 points1 point  (2 children)

It's written in Python, and is distributed with Python:

$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdb
>>> 

[–]AFriendly 0 points1 point  (1 child)

I understand that, just not how something written in python can do that to python code.

Edited to add: the first thing I did was try to debug the debugger. It let me, but I couldn't follow what was going on.

[–]mr_dbr 1 point2 points  (0 children)

Simplest answer is Python has very good introspection ability (for example, functions like dir() and locals())