8

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?

5
  • I don't understand the question. Is there some text or code missing? Why is the headline different from the question text? Commented Dec 11, 2013 at 11:27
  • i changed the description Commented 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? Commented 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. Commented Dec 12, 2013 at 11:07
  • I have same problem. Ever find a fix? Commented Jan 27, 2015 at 13:10

1 Answer 1

3

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, tab Debuggers
  • 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.

Sign up to request clarification or add additional context in comments.

2 Comments

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.
additionally to the above instructions, I had to install termcap libraries: sudo apt-get install libncurses5-dev but everything else worked, so thx!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.