[074] Introducing the pydb Debugger (1/1)
in series:
video tutorial by Rocky Bernstein
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
The Extended Python Debugger (pydb) adds many features people have found missing in the stock Python debugger, pdb. It is probably the most comprehensive Python debugger that exists.
When possible, extensions are made by drawing on the concepts and command syntax of the GNU debugger, gdb. This short demo focuses on some of the aspects of the debugger that are missing in other Python debuggers.
Resources:
See the wiki(PythonBernsteinPydbIntro) for a transcript of the video and the source for gcd.py.
Uploaded on 23rd October 2006, running time 13 minutes.
Video Tutorials related by tag:
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 2944 (since July 30th)
- Plays in last week: 18
- Published: Sometime before 1st March 2007 (in other words - we don't remember!)
Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
Very good introduction.
I am going off the try it now.
Thanks.
Karsten Sorensen
Pydb is exactly what I was looking for - a gdb for Python. A big thanks for all your hardwork.
Sincerely,
Adnan
Nice intro to pydb. I will have to give this a try so I can add this interesting tool to my toolbox.
sufficient to be curious for the rest of this pydb debugger. I personally prefer the vi (vim) editor - not sure if i'll get same functionality - but inspired to look for that. Thanks
Thanks, I look forward to trying the debugger.
Anonymous 9: The tutorial shows commands that are in pydb that are not in pdb. Since this was made however a "warm" or exception type of restart has been added to pdb. (Pydb also has this and a "cold" or "execv" type of restart)
So in particular the things that are in pydb that are not in pdb are also available from inside ipython. .
Fairly recently, work was done to add pydb debugger commands "ipython" and "python". These allow going into those shells from inside the debugger. It's been a little while, but I recall adding a couple of ipython magic commands for such as for continuing execution. The future thrust is that rather than have a separate debugger command interface (based in the Python Cmd class), perhaps one should use the ipython (or normal interactive python) command interface augmented with ipython magic commands which act as debugger commands.
I think I read on the ipython mailing list that as part of the Google Summer of Code, the ipython internals will undergo a much needed cleanup. The ipython/pdb interaction is really ugly and hacked. The ipython/pydb interaction is a bit ugly too, but less so mostly because those parts where pydb could accomodate ipython it did. (This can't be said of the ipython/pdb interaction).
Prossibly after the summer revision of ipython, more along these lines will be done so the debugger output is more seamless with respect to listing source code, showing tracebacks and so on.
I don't know squat about pygtk so I can't comment here. However if pdb works for pygtk, I can't see why pydb can't. But if you are happy with pdb, I don't see a compelling reason to switch.
Finally, work on pydb is getting phased out. I started total rewrite of the debugger along a more solid architecture. See http://code.google.com/p/pydbgr/
Thanks for the pydb video - it was a quick way for me to see that it is just what I'm looking for to try out python (being really comfortable with gdb - it may even still have a little of the code I put in it back in the 80's!)
nice tutorial, thanks I'll try it out. I still don't have an idea of what it gives more than pdb debugger inside ipython. Does it work for debugging pygtk applications?
Thanks for the video - Very helpful :-)
I was looking for more of a polished presentation. Hit me with 10 features that are "most" of what people are looking for, without the mistakes -- like the meta H issue. Although, it was very thoughtful of you to include a video at all. Most SD don't even bother to do that. Thanks for the effort.
Best wishes!
Nice introduction, thanks!
Good work ! I'm love python ! ... 3 weeks programming and this tutorial is very useful. Thanks!
PS: I want more tutorial for python.
Very useful. Thanks!
The audio of the presentation should be more louder.
For the previous question, I see vim being no limitation for python debugger. Just do a google search for "python debugger + vim" and there you with the results.
Thanks for the question. This is not an easy one to address though.
My knowledge of vi is basically using "ESC :" and entering an "ed" command, e.g. $p or s/a/b/. :-) So I'm not versed enough in vi let alone vim to do know how such an interface could be done.
That said, I'm certainly not <b>opposed</b> to the idea should someone else be interested and I would be happy to share whatever knowledge I have on how the the Emacs pydb interaction works. (Not that I wrote that part -- at best I've made <b>slight</b> changes to half a dozen lines.)
A while back I noticed in another debugger I wrote, bashdb, that there was vim support for calling that debugger. I contacted the author about this in order to promote the project in the bashdb manual; I learned that the interaction was extremely basic. Not anywhere near what's commonly available in Emacs.
But speaking of bash support, this does bring to mind the following plan of attack might that be possible. Looking at <a href="http://lug.fh-swf.de/vim/vim-doc/bashsupport.html">that project</a> you'll see that you <b>can</b> start ddd which interacts with pydb. So perhaps that's one way to go for those people who can use ddd.
Just wondered if you had a similar interface between pydb and vim where a cursor stepped through the source ?



