Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-733

Plugin seems to force NDEBUG define, breaking assertions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.3 (rev.07), 2.5.0, 2.5.1
    • Component/s: Qt/MSBuild
    • Labels:
      None
    • Environment:
      Qt 5.13.2
    • Platform/s:
      Windows
    • Commits:
      6cfad4728f804130730f165cd293f92c48bce70f

      Description

      Using assetions is critical for our testing. Unfortunately, Qt Vs Tools seems to disable assertions by forcing NDEBUG define for some reason - even in Debug configuration).

      Steps to replicate:

      1) Create new "Qt Console Application" project

      2) Open "main.cpp" and add " assert(false == true);" before Qt application initialization:

      3) Run the app in Debug mode - assertion is not hit

      4) Go to "assert" definition, NDEBUG seems to be defined:

       

       

       

       

       

        Attachments

        1. assert_exception.gif
          assert_exception.gif
          2.33 MB
        2. assert.avi
          8.49 MB
        3. HelloWorld.zip
          320 kB
        4. image-2020-01-07-12-39-56-221.png
          image-2020-01-07-12-39-56-221.png
          11 kB
        5. image-2020-01-07-12-40-53-808.png
          image-2020-01-07-12-40-53-808.png
          18 kB
        6. image-2020-01-07-12-41-24-682.png
          image-2020-01-07-12-41-24-682.png
          12 kB
        7. image-2020-01-07-12-46-45-580.png
          image-2020-01-07-12-46-45-580.png
          9 kB
        8. image-2020-01-20-17-59-22-736.png
          image-2020-01-20-17-59-22-736.png
          50 kB
        9. msbuild.binlog
          365 kB
        10. screenshot-1.png
          screenshot-1.png
          78 kB
        11. screenshot-2.png
          screenshot-2.png
          55 kB

          Issue Links

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

            Activity

              People

              Assignee:
              mecfc Miguel Costa
              Reporter:
              r0ll1ngst0ne Michael Kostukov
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes