I'm using Qt Creator with Qt 5.1.1 in Ubuntu 12.04.
When I'm using the debugger to show content of any variable, the window always show "no such value" on every variable. Also on variables of type QString
, int
etc.
Is there a configuration problem on my Ubuntu?
Can anybody help me please?

- 10,850
- 5
- 40
- 78

- 81
- 1
- 4
-
I don't understand the question. Is there some text or code missing? Why is the headline different from the question text? – Simon Warta Dec 11 '13 at 11:27
-
i changed the description – user2764107 Dec 11 '13 at 13:03
-
Do you have the same problem when you start a new sample project in Qt Creator? Could you provide any code that shows where the problem occurs? – Simon Warta Dec 11 '13 at 22:20
-
Yes, the problem also exists on new projects. I wrote a simple main with a QString inside and the debugger show only "no such value" as content. – user2764107 Dec 12 '13 at 11:07
-
I have same problem. Ever find a fix? – Dave Thomas Jan 27 '15 at 13:10
1 Answers
It's been a year and a half ago, but the problem still remains actual for Ubuntu 12.04, Qt Creator 3.4.0 based on Qt 5.4.1.
As mentioned in Qt Creator Manual
Starting with version 3.1, Qt Creator requires the Python scripting extension. GDB builds without Python scripting are not supported anymore and will not work. The minimal supported version is GDB 7.5 using Python version 2.7, or 3.3, or newer.
I suppose that gdb --version
gives you 7.4 (the last version of gdb for Ubuntu 12.04). That's why you have no such value issue.
1. Install a fresh gdb (7.8)
Remove the current gdb (to avoid conflicts with new one) and install development packet for python (to build gdb with Python scripting)
sudo apt-get remove gdb
sudo apt-get install python2.7-dev
Install gdb from the sources
wget http://ftp.gnu.org/gnu/gdb/gdb-7.8.tar.xz
tar -xf gdb-7.8.tar.xz
cd gdb-7.8/
./configure --prefix=/usr/local --with-python
make
sudo make install
Now gdb 7.8 is in /usr/local
.
2. Update Qt Creator settings
- Open menu
Tools
>Options ...
- Select
Build&Run
, tabDebuggers
- Click Add
Type Name you like, write Path:
/usr/local/bin/gdb
In tab
Kits
change Debugger: with that you just created
Hope this help someone who still love Ubuntu 12.04 and Qt.
-
This solved my issue, when I type gdb --version on terminal it was showing error like python module load failed. Then I proceed the above steps and works fine, I have used the `--prefix=/usr` instead `--prefix=/usr/local` while configuring, so the Qt creator easily find the debugger without additional setting change. – Haris Apr 06 '16 at 17:50
-
additionally to the above instructions, I had to install termcap libraries: `sudo apt-get install libncurses5-dev` but everything else worked, so thx! – mBardos Oct 07 '16 at 12:34