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. Disable gdb for release builds
Forum Updated to NodeBB v4.3 + New Features

Disable gdb for release builds

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
14 Posts 4 Posters 1.0k 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.
  • E Offline
    E Offline
    Ejok88
    wrote on 4 Aug 2023, 08:27 last edited by
    #1

    Hello.

    OS - Windows 10 x64. Qt 5.12.2. QtCreator 4.12 / 4.11.01

    When I run my program in the release mode I get strange messages:

    [Hook] attach 6380, D:\projects\BrakeTrainer\build-Steering-qt_5_12_2_x64-release\bin\LucasUltimateBrakeTrainerEmu_1.5.1.0.exe
    [Hook] detach 6380, D:\projects\BrakeTrainer\build-Steering-qt_5_12_2_x64-release\bin\LucasUltimateBrakeTrainerEmu_1.5.1.0.exe
    [Hook] detach 6380, D:\projects\BrakeTrainer\build-Steering-qt_5_12_2_x64-release\bin\LucasUltimateBrakeTrainerEmu_1.5.1.0.exe
    Current version :s IsWin11System: -1[PREVIEW] recv window msg, name:(Qt5QWindowIcon) hwd:(505ec) isvisiable(0) istopwnd(1) isTool(0) isPreview(0) pid:(6380)
    

    Google gave me a couple of such questions on stackoverflow with no answers. A search on this forum does not give such questions / no answers.

    Ghat GPT offers me to configure GDB (uncheck "Attach to running debuggee", but I didn't find such a flag in the QtCreator settings).

    J 1 Reply Last reply 4 Aug 2023, 08:36
    0
    • E Ejok88
      4 Aug 2023, 08:27

      Hello.

      OS - Windows 10 x64. Qt 5.12.2. QtCreator 4.12 / 4.11.01

      When I run my program in the release mode I get strange messages:

      [Hook] attach 6380, D:\projects\BrakeTrainer\build-Steering-qt_5_12_2_x64-release\bin\LucasUltimateBrakeTrainerEmu_1.5.1.0.exe
      [Hook] detach 6380, D:\projects\BrakeTrainer\build-Steering-qt_5_12_2_x64-release\bin\LucasUltimateBrakeTrainerEmu_1.5.1.0.exe
      [Hook] detach 6380, D:\projects\BrakeTrainer\build-Steering-qt_5_12_2_x64-release\bin\LucasUltimateBrakeTrainerEmu_1.5.1.0.exe
      Current version :s IsWin11System: -1[PREVIEW] recv window msg, name:(Qt5QWindowIcon) hwd:(505ec) isvisiable(0) istopwnd(1) isTool(0) isPreview(0) pid:(6380)
      

      Google gave me a couple of such questions on stackoverflow with no answers. A search on this forum does not give such questions / no answers.

      Ghat GPT offers me to configure GDB (uncheck "Attach to running debuggee", but I didn't find such a flag in the QtCreator settings).

      J Offline
      J Offline
      JonB
      wrote on 4 Aug 2023, 08:36 last edited by JonB 8 Apr 2023, 08:37
      #2

      @Ejok88 said in Disable gdb for release builds:

      When I run my program in the release mode

      Clarify what you mean by this: are you talking about compiling for Release vs Debug or are you talking about whether you press the Run vs Debug button to run the program from Creator? If you are only talking about how you compile then I cannot see that gdb would be involved in any shape or form.

      E 1 Reply Last reply 4 Aug 2023, 08:50
      0
      • J JonB
        4 Aug 2023, 08:36

        @Ejok88 said in Disable gdb for release builds:

        When I run my program in the release mode

        Clarify what you mean by this: are you talking about compiling for Release vs Debug or are you talking about whether you press the Run vs Debug button to run the program from Creator? If you are only talking about how you compile then I cannot see that gdb would be involved in any shape or form.

        E Offline
        E Offline
        Ejok88
        wrote on 4 Aug 2023, 08:50 last edited by
        #3

        @JonB I compile my program in the Release mode, then I press the Run button.

        My settings for kits:

        Build settings:

        2023-08-04_11-45-34.png

        Run settings:

        2023-08-04_11-46-40.png

        2023-08-04_11-47-35.png

        J 1 Reply Last reply 4 Aug 2023, 09:26
        0
        • E Ejok88
          4 Aug 2023, 08:50

          @JonB I compile my program in the Release mode, then I press the Run button.

          My settings for kits:

          Build settings:

          2023-08-04_11-45-34.png

          Run settings:

          2023-08-04_11-46-40.png

          2023-08-04_11-47-35.png

          J Offline
          J Offline
          JonB
          wrote on 4 Aug 2023, 09:26 last edited by
          #4

          @Ejok88
          If as you say you press Run and not Debug then why do you think gdb, or any debugger, is involved?

          Given which, I don't know what "attach"ing or "detach"ing would be done or where that message comes from.

          E 1 Reply Last reply 4 Aug 2023, 12:51
          1
          • J JonB
            4 Aug 2023, 09:26

            @Ejok88
            If as you say you press Run and not Debug then why do you think gdb, or any debugger, is involved?

            Given which, I don't know what "attach"ing or "detach"ing would be done or where that message comes from.

            E Offline
            E Offline
            Ejok88
            wrote on 4 Aug 2023, 12:51 last edited by Ejok88 8 Apr 2023, 12:52
            #5

            @JonB try to run a some program and then attach gdb to it (And you will see such messages in the application output panel):
            2023-08-04_15-49-03.png

            J 1 Reply Last reply 4 Aug 2023, 13:02
            0
            • E Ejok88
              4 Aug 2023, 12:51

              @JonB try to run a some program and then attach gdb to it (And you will see such messages in the application output panel):
              2023-08-04_15-49-03.png

              J Offline
              J Offline
              JonB
              wrote on 4 Aug 2023, 13:02 last edited by
              #6

              @Ejok88 said in Disable gdb for release builds:

              @JonB try to run a some program and then attach gdb to it (And you will see such messages in the application output panel):

              I don't understand. You asked a question about "run my program in the release mode", and confirmed you click the Run button. No debugger is involved. You have not mentioned using a debugger, you have not mentioned attaching to running processes. You ask about the messages produced.

              Now all of a sudden you seem to talk about "attaching gdb to a running process". Having never mentioned such before. Of course that will produce "attach" messages, Maybe someone else will understand what you are actually asking about, I do not.

              E 1 Reply Last reply 4 Aug 2023, 13:14
              0
              • J JonB
                4 Aug 2023, 13:02

                @Ejok88 said in Disable gdb for release builds:

                @JonB try to run a some program and then attach gdb to it (And you will see such messages in the application output panel):

                I don't understand. You asked a question about "run my program in the release mode", and confirmed you click the Run button. No debugger is involved. You have not mentioned using a debugger, you have not mentioned attaching to running processes. You ask about the messages produced.

                Now all of a sudden you seem to talk about "attaching gdb to a running process". Having never mentioned such before. Of course that will produce "attach" messages, Maybe someone else will understand what you are actually asking about, I do not.

                E Offline
                E Offline
                Ejok88
                wrote on 4 Aug 2023, 13:14 last edited by
                #7

                @JonB I'm sorry, I probably didn't ask my question quite clearly.

                I want to ask - how to eliminate the cause of this behavior? I mean:

                • how to find and disable the source of these messages?

                I explained that these messages are similar to gdb messages, so I'm trying to find where I can disable gdb in QtCreator.

                I gave you an example of "attaching gdb to a running process" to explain how I understood where these messages come from.

                J 1 Reply Last reply 4 Aug 2023, 13:41
                1
                • E Ejok88
                  4 Aug 2023, 13:14

                  @JonB I'm sorry, I probably didn't ask my question quite clearly.

                  I want to ask - how to eliminate the cause of this behavior? I mean:

                  • how to find and disable the source of these messages?

                  I explained that these messages are similar to gdb messages, so I'm trying to find where I can disable gdb in QtCreator.

                  I gave you an example of "attaching gdb to a running process" to explain how I understood where these messages come from.

                  J Offline
                  J Offline
                  JonB
                  wrote on 4 Aug 2023, 13:41 last edited by JonB 8 Apr 2023, 13:45
                  #8

                  @Ejok88
                  But if you "disable" gdb you won't be able to "attach" to running processes.
                  I don't think you can "disable" gdb, but you could always go to where you specify the path to it in your Settings and delete/make it nonsense there.
                  I cannot see how/why Creator would suddenly run gdb, or attach to any process, if all you do is Run an executable from there.
                  The messages look to me like some "hook" which monitors attaching/detaching to processes, maybe to debug them, maybe to "monitor" them. I don't know what is happening to cause that or where they come from.
                  Under Windows anything which produces "debug" output will appear in Creator's "debug" output window. It may not be anything in your code or anything in Qt code.
                  I don't know what application would be producing output of the form

                  Current version :s IsWin11System: -1[PREVIEW] recv window msg, name:(Qt5QWindowIcon) hwd:(505ec) isvisiable(0) istopwnd(1) isTool(0) isPreview(0) pid:(6380)
                  

                  Given that it's misspelled, are you sure it's not your own code, or maybe some third-party (Qt?) library, which is outputting this?

                  Hmm, have you seen https://stackoverflow.com/questions/74938151/why-does-my-qt-creater-output-a-bunch-of-weird-messages-in-the-application-outpu and https://stackoverflow.com/questions/76613326/wierd-debug-output-qt-creator? Looks like those are same as you, and I don't think anyone knows where they come from :) Search the whole of Qt source code?

                  1 Reply Last reply
                  2
                  • Frank_XiaoF Offline
                    Frank_XiaoF Offline
                    Frank_Xiao
                    wrote on 4 Dec 2023, 07:29 last edited by Frank_Xiao 12 Apr 2023, 07:31
                    #9

                    I encounter this problem as well. But I haven't got any solutions yet!
                    Screenshot 2023-12-04 152830.png

                    jsulmJ 1 Reply Last reply 4 Dec 2023, 07:33
                    0
                    • Frank_XiaoF Frank_Xiao
                      4 Dec 2023, 07:29

                      I encounter this problem as well. But I haven't got any solutions yet!
                      Screenshot 2023-12-04 152830.png

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 4 Dec 2023, 07:33 last edited by
                      #10

                      @Frank_Xiao It looks like you're running a debug build. Do you have same problem with release build?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • Frank_XiaoF Offline
                        Frank_XiaoF Offline
                        Frank_Xiao
                        wrote on 4 Dec 2023, 07:39 last edited by
                        #11

                        @jsulm yes. no matter which mode I use, the information remains the same.

                        (btw, plz vote for me so that I can get 1 reputation score to send more replies without waiting for another 10 minutes)

                        1 Reply Last reply
                        1
                        • Frank_XiaoF Offline
                          Frank_XiaoF Offline
                          Frank_Xiao
                          wrote on 4 Dec 2023, 07:42 last edited by
                          #12

                          @JonB you got any progress about this problem?

                          J 1 Reply Last reply 4 Dec 2023, 08:00
                          0
                          • Frank_XiaoF Offline
                            Frank_XiaoF Offline
                            Frank_Xiao
                            wrote on 4 Dec 2023, 07:58 last edited by
                            #13

                            Actually, I think it might have nothing to do with Qt and its libraries. Maybe it's about the environment???

                            I am using Windows 11 Pro (and Windows 11 family before, still has the same problem), I have Visual Studio 2022 and Visual Studio Code installed, and I used to code and build with Visual Studio 2022 with the Qt extension. And, maybe, I encountered this problem after I build and run with VS2022 but I can't be sure if it's because of VS2022.
                            Has anyone used Visual Studio before to build and run Qt projects and encounter this problem?
                            @Ejok88 Did you do the same like me (using VS 2022)?

                            1 Reply Last reply
                            0
                            • Frank_XiaoF Frank_Xiao
                              4 Dec 2023, 07:42

                              @JonB you got any progress about this problem?

                              J Offline
                              J Offline
                              JonB
                              wrote on 4 Dec 2023, 08:00 last edited by
                              #14

                              @Frank_Xiao said in Disable gdb for release builds:

                              @JonB you got any progress about this problem?

                              It wasn't my problem! If you really want to know I suggested:

                              Search the whole of Qt source code?

                              1 Reply Last reply
                              1

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved