tags:

views:

796

answers:

1

I have both GDB and CDB in my machine. My Qt creator is using the CDB for debugging. How do i configure it to use GDB? I tried to point to the GDB path, but it doesn't work. How do i set Qt Creator to debug using GDB?

+2  A: 

Ensure that you have set up Qt Creator to the "Debug" build configuration (Build menu -> Set build configuration -> Debug). It may sound obvious, but I had mine accidentally set to "Release", and spent hours looking for gdb configuration problems when Qt Creator silently ignored my breakpoints despite me running the application with the "Start Debugging" command.

Also note that reconfiguring Qt Creator for debug builds may not be enough in this case, but that you will then have to perform a full rebuild as well to make the configuration changes apply throughout your project (yes, this was an additional step I had to do).

Qt Creator could really do with a warning dialog if you attempt to debug builds with the release configuration, like Visual Studio does it since ages ago. It would avoid those silent fails.

Jonas