I'm trying to set up realgud using ipdb with emacs. The problem is that the following is displayed at the command prompt (running realgud:ipdb): [6n[Jipdb> [6D[6C[6D[J[6n[Jipdb> [6D[6C

From googling around, I came across various links that I think explain what the problem is, but the solutions therein didn't fix my problem:


Why does *compilation* buffer show control characters?

Any help would be greatly appreciated!

  • AFAIK this is a known bug in Emacs since IPython 5.1.0. Please file another bug report, so raising its weight. Commented Aug 13, 2017 at 7:33
  • Yes that's correct. I applied the fix at this link: emacs.stackexchange.com/questions/24453/… but it only fixes the ipython interpreter shell, not the ipdb shell. Commented Aug 13, 2017 at 11:02

3 Answers 3


Just as an update, I managed to fix the problem by adding the following into an executable file in my PATH:

ipython --simple-prompt -i -c "%run -d $@"

Then in emacs when running realgud:ipdb, when asked what command to use, just switch out ipdb with whatever you name the executable file.

On OS X you will need the following package though: https://github.com/purcell/exec-path-from-shell

  • --simple-promt avoids the garbage but doesn't allow multiline-input :( Commented Aug 15, 2017 at 9:34
  • Yeah it's not really a fix I guess, just a workaround. Commented Aug 15, 2017 at 9:35
  • I will file a bug report when I get a chance. Commented Aug 15, 2017 at 9:35
  • #!/bin/bash ipython --simple-prompt -i -c "%run -d $@" -->thanks it works for me. emacs25.2+ spacemacs settting+ipython 6.2.1+ ipdb 0.10 Commented Feb 19, 2018 at 17:43

in spacemacs, add the shell layer, will solve this problem: enter image description here


Commit b8b587b of Nov 26, 2018 may fix this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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