Under Emacs, I opened a .py file. I want to debug it using pdb.
I hit M-x pdb, then the bottom bar of Emacs asks me:
Run /usr/lib/python2.7/pdb.py (like this): /usr/lib/python2.7/pdb.py test.py
I hit Enter. Then it creates a new buffer showing
Current directory is ~/python_programs/
It doesn't show the prompt of pdb. When I enter pdb commands such as n, they are just entered that new buffer, as if I were editing the buffer. It seems that no pdb is running.
But if I invoke pdb again for my .py file in the same way as above, the bottom bar of Emacs will say:
This program is already being debugged
I am baffled. Do I miss something?
Thanks.
p.s. If it matters, I am using python-mode.el, but I guess the problem has nothing to do with it.
Emacs command pdb is defined in core. It offers the last file in its history for debugging.
Seems you have to replace test.py by the current buffer-file-name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With