Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-7336

CDB: Breakpoints don't work in catch blocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 2.8.0
    • Qt Creator 2.5.0-rc
    • Debugger
    • None
    • MSVC 2008 x86, Windows 7 x64
    • a8a49c985160f5de24922384bc7217cab8ba2348

    Description

      To reproduce:

      • load the following program in Qt Creator
      • set a breakpoint on the fprintf in the catch block
      • run the debugger

      What happens:

      • The breakpoint is moved to the first line outside of the catch block.
      #include <QDebug>
      #include <QString>
      
      struct MyException
      {
          QString message;
      };
      
      void crazyFunction()
      {
          MyException e;
          e.message = "World is going to end soon!";
          throw e;
      }
      
      int main(int argc, char *argv[])
      {
          try {
              crazyFunction();
          }
          catch (MyException &e) {
              fprintf(stderr, "ERROR: %s\n", qPrintable(e.message));    // set breakpoint here
          }
      
          return 0;
      }
      

      Attachments

        Activity

          People

            erikv Erik Verbruggen
            jbornema Joerg Bornemann
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: