This is a bit old topic, but still seems to be valid, because I have the same problem in Fedora. Changing terminal doesn't seem to fix it, same problem with gnome's default or xterm which I'm using for this project. Code::Blocks shows this error:
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /home/krice/projects/saladir/bin/Debug/saladir
Setting SHELL to '/bin/sh'
done
Setting breakpoints
Debugger name and version: GNU gdb (Fedora Linux) 16.3-1.fc42
Error opening terminal: unknown.
[Inferior 1 (process 7216) exited with code 01]
Debugger finished with status 0
I've tried to find answers to this, but looks like no one has solved this in... about 20 years? ps. Running in normal mode works, only debugging fails.