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

Many breakpoints shows when debugging

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 2.1.0
    • None
    • Debugger
    • None
    • 15fc9396b5065fd8146f7c3415bbd2ccb9d70091

    Description

      Look at code below:

      #include <iostream>
      
      int main(int argc, char *argv[])
      {
          int z = 2;
          switch (z) {
          case 0:
              return 0;
          case 1:
              return 0;
          default:
              return 0;
          }
      
          std::cout << "123";
      }
      

      1. Put breakpoint at line "std::cout << "123";"
      2. Start project with debugging (F5)
      3. When breakpoint you placed will be disappeared (moved to last line) - try to put breakpoint on that line twice (click twice F9 on that line)
      4. When application will be runned - you will see two breakpoints on last line. It's a bug. Press F5 three times to stop application.
      5. You will see two breakpoints on line when you put just one breakpoint. It's a bug too.

      I think I know what happens. See next code:

      #include <iostream>
      
      int main(int argc, char *argv[])
      {
          int z = 2;
          switch (z) {
          case 0:
              return 0;
          case 1:
              return 0;
          default:
              return 0;
          }
      
          std::cout << "123";
          std::cout << "123";
          std::cout << "123";
      }
      

      If you put breakpoints on each line with "std::cout" and click F5 - three breakpoints moved to the last line and when application will be closed - breakpoints will be returned to their places. It's right behavior but due this mechanism I see bug I described ahead.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            joe Sam Protsenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes