Running debug mode in Qt Creator

Karnivaurus picture Karnivaurus · Oct 24, 2014 · Viewed 16.6k times · Source

I am trying to compile some demo code (specifically, the pcl_visualizer demo that comes with the Point Cloud library). When running debug by clicking the green arrow with the magnifying class, I get the following errors:

This does not seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.

Section .debug_info: Not found.
Section .debug_abbrev: Not found.
Section .debug_line: Not found.
Section .debug_str: Not found.
Section .debug_loc: Not found.
Section .debug_range: Not found.
Section .gdb_index: Not found.
Section .note.gnu.build-id: Found.
Section .gnu.hash: Found.
Section .gnu_debuglink: Not found.

Furthermore, none of the breakpoints I have inserted are breaking the program, and they all have little hourglasses hovering over.

In Projects, the Debug mode is selected in Build Settings.

Why does my code not seem to be debugging correctly?

Answer

qubodup picture qubodup · Nov 15, 2015

Some projects automatically build debug mode and allow to run it individually. You can then pick it in the bottom left Run selection menu.

Animation of the Run menu and the Projects view

Other projects require you to specifically do a debug build.

For example: Kdenlive requires you to run CMake again with the following parameter added:

-DCMAKE_BUILD_TYPE=Debug

You can re-run CMake in the Projects view.