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. Debugging with QTCreator

Debugging with QTCreator

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 906 Views
  • 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.
  • ccx004C Offline
    ccx004C Offline
    ccx004
    wrote on last edited by
    #1

    Hi All,

    I've just built QT 5.7.1 and QTCreator 4.2.0 from sources and created my "Hello World" program just to make sure everything was okay. When I tried to build it, I had an error about some DLLs being missing such as QT5Cored.dll. I realised that I had only built a release version of qt and hence the error. Sure enough a release version of my little program built and ran fine. However, it struck me as odd that in order to debug my 5 line program (including blank lines) I need to also be able to debug all of Qt so I took the LIBS= line from Makefile.release and replaced the LIBS= line in Makefile.debug with it. My little program them built happily using that Makefile and I could debug it from within QTCreator quite happily as well. Obviously I can't debug the Qt libraries but lets be honest: If I write a program and there is a bug the chances are it will be in my code and not in the Qt code so I wondered is there any way to get QTCreator to build a debugging version of my code but use the release versions of libraries such as Qt. I did go through all the options in QTCreator but didn't see anything that seemed to do that. I guess I could add a LIBS = line to the project file but what libraries would need to be included? On a large project there could be a lot.

    Anyway, if anyone knows of a way to just debug the code I write and not the Qt code when using QTCreator I would be very grateful if they could let me know.

    Best wishes...
    Colin Bruce

    ccx004C 1 Reply Last reply
    0
    • ccx004C ccx004

      Hi All,

      I've just built QT 5.7.1 and QTCreator 4.2.0 from sources and created my "Hello World" program just to make sure everything was okay. When I tried to build it, I had an error about some DLLs being missing such as QT5Cored.dll. I realised that I had only built a release version of qt and hence the error. Sure enough a release version of my little program built and ran fine. However, it struck me as odd that in order to debug my 5 line program (including blank lines) I need to also be able to debug all of Qt so I took the LIBS= line from Makefile.release and replaced the LIBS= line in Makefile.debug with it. My little program them built happily using that Makefile and I could debug it from within QTCreator quite happily as well. Obviously I can't debug the Qt libraries but lets be honest: If I write a program and there is a bug the chances are it will be in my code and not in the Qt code so I wondered is there any way to get QTCreator to build a debugging version of my code but use the release versions of libraries such as Qt. I did go through all the options in QTCreator but didn't see anything that seemed to do that. I guess I could add a LIBS = line to the project file but what libraries would need to be included? On a large project there could be a lot.

      Anyway, if anyone knows of a way to just debug the code I write and not the Qt code when using QTCreator I would be very grateful if they could let me know.

      Best wishes...
      Colin Bruce

      ccx004C Offline
      ccx004C Offline
      ccx004
      wrote on last edited by
      #2

      Oh well, 5 months on, a new version of Qt (5.8.0) and QTCreator (4.3.0) and no replies. I guess having to debug Qt as well as my little programs is the way it is. It also means I need to install several GB of libraries that I will never actually step through just to debug my little libraries. I don't think this is a sensible design feature but then again; what do I know?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        That's a question you can bring to the Qt Creator mailing list. You'll find there Qt Creator's developers/maintainers. This forum is more user oriented.

        On a side note, it's pretty unusual to build both Qt Creator and Qt to start development. Most people either use the pre-built package using the online/offline installers or if on Linux, their distribution provided Qt. Why that path ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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