3

I try to debug a trivial helloworld cpp project with qtcreator.

When I start debugging the project, I obtain an error saying:

The selected build of GDB does not support Python scripting.
It cannot be used in Qt Creator.

My system is debian9

My QT version is 5.14.2
Here is my .pro file:

QT += widgets
TEMPLATE = app
SOURCES  = main.cpp

Can anyone show me how I should configure GDB with QT to avoid this error?

2

1 Answer 1

3

As @Mark Plotnik (Thank you Mark) suggested, you have a gdb-minimal installed.

Running dpkg --get-selections | grep gdb, you should have an ouput like the following:

gdb-minimal                 install
gdbm-l10n                   install
libgdbm-compat4:amd64       install
libgdbm6:amd64              install
wireless-regdb              install

Only gdb-minimal, there is no gdb.

Here is what I did to solve this problem on my debian 9 system:

sudo apt install gdb

to get the full gdb.

If you rerun the command after the installation dpkg --get-selections | grep gdb, you should have :

gdb                         install
gdb-minimal                 deinstall
gdbm-l10n                   install
libgdbm-compat4:amd64       install
libgdbm6:amd64              install
wireless-regdb              install

You should have gdb installed and gdb-minimal uninstalled.

After this, I retested debugging on qtCreator and it works now.

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

1 Comment

On Debian 11 BullsEye installing gdb will automatically uninstall gdb-minimal. Uninstalling manually before installing gdb will uninstall a few other packages like kde-plasma-desktop and such, which usually you don't want. If you simply install gdb, apt takes care of the dependency.

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.