Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I debug an application?
Forum Updated to NodeBB v4.3 + New Features

How can I debug an application?

Scheduled Pinned Locked Moved General and Desktop
9 Posts 7 Posters 6.5k 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.
  • J Offline
    J Offline
    jadiazlab
    wrote on last edited by
    #1

    Hello!
    When I try debug any application Qt Creator show me an error message saying: "No debugger set up". How can I resolve this problem? Thanks

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Does debugging work for GUI apps? What platform are you coding on? Is gdb installed?

      Try toggling "Run in terminal" checkbox in your project's "Run" settings.

      (Z(:^

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QMartin
        wrote on last edited by
        #3

        Hello,

        On the QtCreator bottom left corner, click on the screen and select a debug build. Then just build and start debugging (make sure you specified a debug and release configurations when the project was configured). If you want to debug as @sierdzio says, look for gdb manual pages if you are new to this issue.

        Good luck!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Did you try to set up a debugger in tools>options>Build & run>Kits ?

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jadiazlab
            wrote on last edited by
            #5

            Following this path, my kit is Desktop Qt 5.0.0 MSVC2010 32bits (SDK) but in Debugger says CDB Engine <None> that's why I can't debug any application. How can I set up a debugger?
            [quote author="Tobias Hunger" date="1356604689"]Did you try to set up a debugger in tools>options>Build & run>Kits ?[/quote]

            1 Reply Last reply
            0
            • B Offline
              B Offline
              BobWu
              wrote on last edited by
              #6

              Download and install an windows SDK, you can choose just install the debugger.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jadiazlab
                wrote on last edited by
                #7

                GDB is not installed. I'm using Qt for Windows.
                [quote author="sierdzio" date="1356555073"]Does debugging work for GUI apps? What platform are you coding on? Is gdb installed?

                Try toggling "Run in terminal" checkbox in your project's "Run" settings.[/quote]

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  wssddc
                  wrote on last edited by
                  #8

                  I've got CDB.exe from a Windows SDK, but Creator 2.61 doesn't detect it and doesn't let me edit or delete the auto-detected kit. So I configure a kit manually and try to remember not to use the one with no debugger.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kirangps
                    wrote on last edited by
                    #9

                    I too facing issue with debugging Qt on Windows. Let me tell you workaround [probably this may not fix your problem, but can be alternative to debug your application]:
                    Note: This is valid only if you are compiling Qt application with MSVC2008 (Qt SDK) or MSVC2010 (Qt SDK) in your Qt Creator[i.e basically if you are compiling with nmake]

                    1. Successfully build your application with Qt creator
                    2. Open "Visual Studio Command Prompt (2008)" or "Visual Studio Command Prompt (2010)" from start menu > All Programs > Microsoft Visual Studio 20xx > Visual Studio Tools
                    3. Navigate to location where your exe is built, for example cd c:\MyApp\debug\ in command prompt.
                    4. run command
                      devenv MyApp.exe
                      This should open Visual Studio 20xx solution explorer
                    5. Now in Visual Studio 20xx go to File > Open ; and open all your source files (*.cpp and .h files for MyApp)
                    6. Keep break-points where ever you wish and press F5.
                      You must be able to debug your application now on Visual Studio environment.
                    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