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?
-
I don't understand the question. Is there some text or code missing? Why is the headline different from the question text?Simon Warta– Simon Warta2013-12-11 11:27:59 +00:00Commented Dec 11, 2013 at 11:27
-
i changed the descriptionuser2764107– user27641072013-12-11 13:03:33 +00:00Commented Dec 11, 2013 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– Simon Warta2013-12-11 22:20:22 +00:00Commented Dec 11, 2013 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– user27641072013-12-12 11:07:10 +00:00Commented Dec 12, 2013 at 11:07
-
I have same problem. Ever find a fix?Dave Thomas– Dave Thomas2015-01-27 13:10:07 +00:00Commented Jan 27, 2015 at 13:10
1 Answer
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/gdbIn tab
Kitschange Debugger: with that you just created
Hope this help someone who still love Ubuntu 12.04 and Qt.
2 Comments
--prefix=/usr instead --prefix=/usr/local while configuring, so the Qt creator easily find the debugger without additional setting change.sudo apt-get install libncurses5-dev but everything else worked, so thx!