False "application not responding" box is creating havoc with GDB

I'm trying to debug a C++ application using GDB and the Qt Creator IDE. Every time the debugger stops on a breakpoint, Ubuntu (v 17.10) thinks the application is frozen and issues the dialog box with the warning that "{application} is not responding" with options to force quit or wait. Waiting only results in the same dialog popping up 5 seconds later. The debugger is unusable while the dialog box is open. Is there a way to disable this warning entirely in Ubuntu?

Note 1: just found this question which is very similar but with Java.

Note 2: This happens in Gnome3 but not Unity. A temporary work-around is to log in using the Unity desktop.

Note 3: It appears this has been fixed in Ubuntu 18.04 (GCC 7.3).


There is a gnome shell extension to disable the force close dialog. It isn't the best solution but it helps working around apps that "lock" the GUI.

Download this

Extract it to $HOME/.local/share/gnome-shell/extensions/[email protected]/

Reload Gnome with Alt+F2, r, enter (it won't kill your session / apps)

Open Tweaks, under Extensions, activate it.