Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] QtCreator skips breakpoints despite debug build
Forum Updated to NodeBB v4.3 + New Features

[Solved] QtCreator skips breakpoints despite debug build

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dispy
    wrote on last edited by
    #1

    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);
    painter->setBrush(QBrush("#000000"));
    

    [...]@
    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!

    Regards,

    EDIT: Apparently, I'm not the only one affected by this problem: http://qtcreator.blogspot.de/2009/10/breakpoint-woes.html
    That's old but also with my QtCreator the hourglass does not disappear when debugging is started.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andrep
      wrote on last edited by
      #2

      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 bugreports.qt-project.org and attach the debuger log of the failing case there (Windows->Views ->Debugger Log)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dispy
        wrote on last edited by
        #3

        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 ;-).

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved