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

Can't debug cmake msvc application with /MTd flag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.6.1
    • Debugger
    • None
    • Windows 7 SP1 x64
      Visual Studio 2015 14.0.25431.01 Update 3
        Visual C++ 2015
      cdb version 6.3.9600.17298
      Qt Creator 4.6.1 x64 (official download)
      CMake 3.12
    • Windows

    Description

      CDB debugging not work when project compiled with "/MTd" flag.

      For simplicity use simple C++ project without any Qt dependency.

      Steps to reproduce:

      • Open the CMakeLists.txt in open project dialog (see attachments)
      • Select kit with MSVC x86 compiler and CDB debugger (see attached picture)
      • Build project with Debug configuration and set some breakpoints
        • for example set breakpoints at:
          • main.cpp:5:   int sum = a + b;
          • main.cpp:14:  int num3 = num2 + sum(10, 90);
      • Run in debug mode

      Actual result:

      The debugger doesn't stop at the breakpoints.

      Expected result:

      The debugger stops at the breakpoints and can examine/modify variables etc.

       

      If remove/comment out the "set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od" CACHE INTERNAL "")" from CMakeLists.txt the debugging works fine.

      Attachments

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

        Activity

          People

            hjk hjk
            crash5 crash5
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes