Debugger does not start. GDB not support Python scripting.
I have just upgraded to Qt Creator 5.3
When I try to run the debugger I get the message box
"The selected build of GDB does not support Python scripting it cannot be used in Qt Creator"
And no debugging happens.
When I run the auto detected GDBs in Options | Build & Run I get below.
(Ubuntu 14.04) I get the following results.
$ gdb version
GNU gdb (GDB) 7.7
$ python --version
Before I upgraded, debugging could happen, but local variable informatino was not very good.
Thanks for anyhelp
What does gdb says if you run python inside it.
(gdb) python print("Hello, world!")
I guess you need to check python version. On Ubuntu 14.04 I have
(gdb) python import sys; print (sys.version)
3.4.0 (default, Apr 11 2014, 13:08:54)
And I have both 2.7 and 3.4 python installed.
$ python --version
$ python3 --version
(gdb) python print("Hello world!")
Python scripting is not supported in this copy of GDB.
The latest version of QtCreator does not support gdb without python, so you need to install Ubuntu package or build gdb with python support
Here is how it looks like on Ubuntu 14.04
$ gdb --version
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Thanks, inspired by http://blog.hostilefork.com/qtcreator-debugger-no-locals-ubuntu/
I dowloaded gdb 7.7.1 from http://ftp.gnu.org/gnu/gdb/
I then run form gdb-7.7.1 directory(not sure whether configure options needed)
./configure --prefix /usr/local/gdb-python2 --with-python
I then created a new debugger link in Tools | Options | Build & Run, Debugger manual section pointing to /usr/local/gdb-python2/bin/gdb, and a new kit in Kits Manual section using that link.
It seems to be able to debug now.
For debian stretch users:
sudo apt-get install gdb-python2
Under Kubuntu 16.04 and Qt creator 4.4.1, uses udo apt-get install gdb python2.7-dbg
Check gdb packet, on my system (Kali Linux) by default was installed "gdb-minimal". Replase it by full "gdb" packet with include python support.