When using gdb with M-x gdb, the *input/output* buffer always pops up aggressively in any frame which has focus and isn't already displaying it. I would like the *input/output* buffer to stay quietly in the background unless I manually bring it up.

Here's a very simple example with emacs -Q

run M-x gdb. give a program of bash and hit Return

in the *gud-bash* window, enter run -c "while true; do echo hi && sleep 1; done"

Notice how the *input/output of bash* window pops up. If you dismiss that buffer with C-x 1 from the *gud-bash* window, it comes back as soon as gdb produces any more stdout. That's the behavior I don't want.

In particular, now run M-x make-frame (from the *gud-bash* window). Notice how in the new frame, *input/output of bash* also pops up! So it demands one window out of every single emacs frame.

How can I fix this?

Edit: I almost forgot to add - emacs version of

GNU Emacs 24.5.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.30)

2 Answers 2


As soon as emacs 25 lands, there will be a variable gdb-display-io-nopopup to fix this problem

  • Thank you, thank you, thank you! This has been an irritation for me for years! This solved my problem. Commented May 2, 2019 at 17:56

split emacs window into three (c-x 3), and assign one window to the input/output buffer (c-x b, input/output)

Stops the popup, and program output is displayed in the "input/output" buffer window

  • Clarify what you mean by "screen", and by "assign". Also I'm not sure it addresses the issue that the debugger code forces you to have the input/output buffer displayed in a window in each frame.
    – Stefan
    Commented Oct 5, 2018 at 12:27
  • 1
    split emacs windows: (c-x n), assign buffer to a window (c-x b) Commented Oct 5, 2018 at 12:56

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.