Important: Please read the Qt Code of Conduct -

[Solved] QtCreator skips breakpoints despite debug build

  • Hi,

    QtCreator seems to skip my breakpoints in some cases.
    I subclassed QWidget and overwrote its paintEvent method:
    @void Fractal::paintEvent(QPaintEvent *event){
    double x = (double) this->width();
    double y = (double)this->height();

    points.reserve(x * y); // this is a std::vector<Point>
    complex middle = 0;       // typedef std::complex<double>
    complex left_top = -3 + 3i;
    complex right_bottom = 3 - 3i;
    double steps = 100;
    complex realDir = real(right_bottom - left_top) / steps;
    double  reprDir = x / steps;
     QPainter *painter = new QPainter(this);

    He won't stop at my breakpoint at "double reprDir =". But if I add a "return;" directly after that, or after the QPainter, the breakpoint works like a charm. If I add the return after "painter->setBrush" it again won't work.

    It's not that the code isn't executed - I placed some outputs on std::cout all over the code and they show up indeed.
    bq. Linux MadeToWork 3.2.0-53-generic-pae #81-Ubuntu SMP Thu Aug 22 21:23:47 UTC 2013 i686 athlon i386 GNU/Linux
    QTCreator 2.4.1 Based on Qt 4.8.0 32Bit Built on March 21 2012
    GNU gdb 6.8

    Thanks in advance!


    EDIT: Apparently, I'm not the only one affected by this problem:
    That's old but also with my QtCreator the hourglass does not disappear when debugging is started.

  • GDB 6.8 has not been supported for ages (even if it probably should work).
    IIRC, 7.0.1 was already minimum for Qt Creator 2.0.

    Once you can reproduce the problem with a more recent version, say 7.4 or newer, open a bug report at and attach the debuger log of the failing case there (Windows->Views ->Debugger Log)

  • Thank you for your reply.
    Being curious why I hadn't had the newest gdb version I took a look at the package - and it claimed to be 7.4. Indeed, one way or another the old 6.8 version was still in /usr/local/bin/gdb. Some application or another must have overwritten that one. I created a symlink to /usr/bin/gdb (7.4) and everything works fine now.

    Thank you very much for your assistance. You saved my day ;-).

Log in to reply