pdb doesn't work in Emacs after upgrading to Feisty

Bug #114933 reported by levander on 2007-05-16
Affects Status Importance Assigned to Milestone
emacs21 (Ubuntu)

Bug Description

Binary package hint: emacs21-common

here is a comp.lang.python thread I started with the exact same text I'm reporting here for this bug. There's some good discussion from people who really know python on there:


I've been using pdb under emacs on an Ubuntu box to debug python programs. I just upgraded from Ubuntu Edgy to Feisty and this combo has stopped working. Python is at 2.5.1 now, and emacs is at 21.41.1.

It used to be I could just "M-x pdb RET pdb <script-name> RET" and be presented with a prompt where I could debug my script, as well as an
arrow in another source code buffer indicating where I am in the source code.

Now however, when I do "M-x pdb RET pdb ~/grabbers/npr-grabber.py -s WESUN", I get this is in a buffer called *gud*:

Current directory is /home/levander/grabbers/

No prompt or anything follows it, just that one line. It doesn't pop up an arrow in the other buffer either. None of the regular commands
like 'n', 's', or 'l' do anything here. So, I did a 'Ctrl-C' and got:

> /home/levander/grabbers/npr-grabber.py(24)<module>()

-> """
(Pdb) > /home/levander/grabbers/npr-grabber.py(30)<module>()
-> import getopt
(Pdb) Traceback (most recent call last):
  File "/usr/bin/pdb", line 1213, in main
  File "/usr/bin/pdb", line 1138, in _runscript
    self.run(statement, globals=globals_, locals=locals_)
  File "bdb.py", line 366, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "/home/levander/grabbers/npr-grabber.py", line 30, in <module>
    import getopt
  File "/home/levander/grabbers/npr-grabber.py", line 30, in <module>
    import getopt
  File "bdb.py", line 48, in trace_dispatch
    return self.dispatch_line(frame)
  File "bdb.py", line 66, in dispatch_line
  File "/usr/bin/pdb", line 144, in user_line
    self.interaction(frame, None)
  File "/usr/bin/pdb", line 187, in interaction
  File "cmd.py", line 130, in cmdloop
    line = raw_input(self.prompt)
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /home/levander/grabbers/cmd.py(151)cmdloop()

-> pass

It's wierd because at the bottom of that call stack, it does look like it's wating for input, but no input works... And, after I hit Ctrl-C I do get a prompt as you see at the bottom of that listing just above. Now I type "quit" and get:

Post mortem debugger finished. The /home/levander/grabbers/npr-
grabber.py will be restarted

levander (levander) wrote :

Just wanted to add that this bug really shocks me. Aren't there a lot of Canonical developers using python? Do they just not use emacs or pdb to debug their code?

That Usenet thread I pointed to has stuff about ipython.el that you can download from other places on the internet not working also.

Micah Cowan (micahcowan) on 2007-05-18
Changed in emacs21:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
levander (levander) wrote :

I tried pdb in the emacs-snapshot and emacs-snapshot-gtk packages. It doesn't work in those places either.

However, Alexandre Vassalotti is maintaining an emacs package because he wants custom fonts or something like that. pdb is working for me with his package. Instructions for installing his package can be found on his blog in this entry:


I haven't tried ipython.el that can be downloaded from the internet with anything but the Ubuntu emacs21 package. I plan to try it with Alexandre's package soon.

Nuño (niglesi) wrote :

Things continue like this...
at least emasc-snapshot works correctly

levander (levander) wrote :

I just tried this the other day on Gutsy. pdb mode worked fine for me. I was using the emacs package, not emacs-snapshot.

Is this still an issue for you? Which Ubuntu version do you use? Thank you for telling us!

Changed in emacs21 (Ubuntu):
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for emacs21 (Ubuntu) because there has been no activity for 60 days.]

Changed in emacs21 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers