Suppose I want to debug Python script in Emacs. M-x pdb run pdb like this pdb script name.py. Next I'd like to examine a variable. I type p and first letters of a variable name, then press Tab and instead of completion of the variable name cursor moves right. Ho to achieve completion of a variable name on Tab press while debugging Pyhon in Emacs?


I have used M-x pdb on and off for quite some time now, and while I would love to be corrected on this, unfortunately I don't think it supports tab completion.

I have recently started playing with RealGUD, and if you use this package with ipdb instead of pdb you will get some really nice features including tab completion.

enter image description here

M-x pdb is nice because it is built in, but I personally have never found it to be satisfactory for my needs.

  • I installed realgud through melpa (GNU Emacs 24.3.1, Ubuntu 14.04). realgud:ipdb puts a lot of unreadable garbage in buffer and tab completion doesn't work either. It posts the message no prompt found or comint-pomp-regexp not set properly. – Alexey Reshetnyak Aug 20 '16 at 5:13
  • @AlexeyReshetnyak I am not sure what the problem is. I am on Emacs 24.5.1 and Ubuntu Gnome 16.04. I included a screenshot to what it looks like for me out of the box. Includes nicely formatted context for where you are in the script, which I like. Maybe a little busy for some though. The only dependency I installed was python-ipdb through apt. – elethan Aug 20 '16 at 12:19
  • elethan, I installed the latest version of Emacs (25.1.50), but it didn't solve the problem. Still have garbage in console. Anyway thank you for the answer it might be useful to someone. – Alexey Reshetnyak Aug 20 '16 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.