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. Debug configuration missing error
Forum Updated to NodeBB v4.3 + New Features

Debug configuration missing error

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
build and run
8 Posts 8 Posters 12.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.
  • A Offline
    A Offline
    akshaybabloo
    wrote on 3 Dec 2021, 20:19 last edited by akshaybabloo 12 Mar 2021, 22:21
    #1

    I have been getting the following error:

    error: No "Debug" CMake configuration found. Available configuration: "Release".
    Make sure that CMAKE_BUILD_TYPE variable matches the "Build type" field.
    

    And my initial CMake parameters are:

    -GNinja
    -DCMAKE_BUILD_TYPE:STRING=Debug
    -DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
    -DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
    -DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
    -DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
    -DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}
    

    I honestly don't know what the problem is. The Release type works fine.

    Update

    I am using Conan cmake tool, removing or keeping does not make any difference

    1 Reply Last reply
    1
    • T Offline
      T Offline
      Talkless
      wrote on 28 Dec 2021, 13:24 last edited by
      #2

      @akshaybabloo said in Debug configuration missing error:

      I honestly don't know what the problem is. The Release type works fine.

      Same issue for me, for some of the projects, though in the different way - Debug works, but Release does not :)

      CMakee 3.18.4 on Debian 10 Buster,
      Qt Creator 6.0.1,
      Qt 5.15.7 and Qt 5.13.2

      1 Reply Last reply
      1
      • _ Offline
        _ Offline
        __F3R__
        wrote on 14 May 2022, 17:21 last edited by __F3R__
        #3

        Could you resolve it? I'm having the same problem as @akshaybabloo, I've tried everything without success, this is making me crazy.

        EDIT: SOLVED IT!! @akshaybabloo and @Talkless, check your CMakeLists.txt file, the one in the base of your project; there you must have a line saying

        set(CMAKE_BUILD_TYPE Release)
        

        Just surround it with if's, just like this

        if(NOT CMAKE_BUILD_TYPE)
            set(CMAKE_BUILD_TYPE Release)
        endif()
        

        Now everything works as expected.

        R 1 Reply Last reply 12 Feb 2024, 00:39
        0
        • _ __F3R__
          14 May 2022, 17:21

          Could you resolve it? I'm having the same problem as @akshaybabloo, I've tried everything without success, this is making me crazy.

          EDIT: SOLVED IT!! @akshaybabloo and @Talkless, check your CMakeLists.txt file, the one in the base of your project; there you must have a line saying

          set(CMAKE_BUILD_TYPE Release)
          

          Just surround it with if's, just like this

          if(NOT CMAKE_BUILD_TYPE)
              set(CMAKE_BUILD_TYPE Release)
          endif()
          

          Now everything works as expected.

          R Offline
          R Offline
          rips
          wrote on 12 Feb 2024, 00:39 last edited by
          #4

          @__F3R__

          I know this is old, but I just wanted to confirm that this worked for me. I was having the exact same issue.

          Thanks!

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Maziar111
            wrote on 16 Mar 2024, 16:14 last edited by
            #5

            Hi, I had the same problem just follow the images
            2ec7652a-8d2e-46c0-b74d-0bdf91599609-image.png

            to solve this issue for one of platform I just changed kit as following image
            bf20dff3-6784-45e8-a58b-8043478b484b-image.png
            43e5d705-3fea-4a83-914f-bc8eb5f6632c-image.png

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Shivani_Elavena
              wrote on 12 Jul 2024, 07:10 last edited by
              #6

              Hi, I had the same problem i.e. the cmake configuration issue.
              How I need to solve the issues(just follow the image)
              How I need to build and debug with the STM32 Boards?
              QT.PNG

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chenqichen
                wrote on 31 Aug 2024, 12:28 last edited by chenqichen
                #7

                根本原因是Qt Creator不保存CMAKE变量CMAKE_BUILD_TYPE,该变量一直保持着第一次设置的值。所以,当我们切换构建类型时需要改变该变量为当前构建类型,手动修改该变量或者点击用初始参数重新配置。
                截屏2024-08-31 20.27.55.png

                ba6810d8-ab7e-416a-89f6-fd4651508eb5-image.png

                设置完记得Run CMake
                1f7f4084-c252-426e-8a3f-0191ad9859d0-image.png

                C 1 Reply Last reply 31 Aug 2024, 12:36
                0
                • C chenqichen
                  31 Aug 2024, 12:28

                  根本原因是Qt Creator不保存CMAKE变量CMAKE_BUILD_TYPE,该变量一直保持着第一次设置的值。所以,当我们切换构建类型时需要改变该变量为当前构建类型,手动修改该变量或者点击用初始参数重新配置。
                  截屏2024-08-31 20.27.55.png

                  ba6810d8-ab7e-416a-89f6-fd4651508eb5-image.png

                  设置完记得Run CMake
                  1f7f4084-c252-426e-8a3f-0191ad9859d0-image.png

                  C Offline
                  C Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 31 Aug 2024, 12:36 last edited by
                  #8

                  @chenqichen please write in english or use the appropriate subforum for your language.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  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