Reputation: 2243
besides from using a completely integrated IDE with debugger for python (like with Eclipse), is there any little tool for achieving this:
It doesnt need to be polished, not even absolutely stable, it could be introspection example code for some widget library like wx. Platform independent would be nice though (not a PyObjC program, or something like that on Windows).
Any Ideas ?
Edit: Yes, i know about pdb, but I'm looking for a graphical tree of all the current objects.
Nevertheless, here is a nice introduction on how to use pdb (in this case in Django): pdb + Django
Upvotes: 2
Views: 2794
Reputation: 222862
Winpdb is a platform independent graphical GPL Python debugger with an object inspector.
It supports remote debugging over a network, multiple threads, namespace modification, embedded debugging, encrypted communication and is up to 20 times faster than pdb.
Some other features:
Here's a screenshot that shows the local object tree at the top-left.
(source: winpdb.org)
Upvotes: 5
Reputation: 6492
Python Debugging Techniques is worth reading. and it's Reddit's comment is worth reading too. I have really find some nice debug tricks from Brian's comment. such as this comment and this comment.
Of course, WingIDE is cool (for general Python coding and Python code debugging) and I use it everyday. unlucky for WingIDE still can't embedded a IPython at now.
Upvotes: 1
Reputation: 881715
If a commercial solution is acceptable, Wingware may be the answer to the OP's desires (Wingware does have free versions, but I don't think they have the full debugging power he requires, which the for-pay versions do provide).
Upvotes: 1
Reputation: 375594
pdb isn't windowed, it runs in a console, but it's the standard way to debug in Python programs.
Insert this where you want to stop:
import pdb;pdb.set_trace()
you'll get a prompt on stdout.
Upvotes: 2
Reputation: 132247
You can use ipython, with the %debug
statement. Once your code crashes, you can add breakpoints, see objects etc. A very crude way to kickoff the debugger is to raise Exception
at some line of your code, run it in ipython, the type %debug
when it crashes.
Upvotes: -1