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. Debug and Release mode
Forum Updated to NodeBB v4.3 + New Features

Debug and Release mode

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 5.9k 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.
  • S Offline
    S Offline
    shoyeb
    wrote on last edited by
    #1

    Hi,

    Can anyone tell me, what is the difference between DEBUG and RELEASE mode in the build configuration?

    Please reply.

    Thanks in advance...

    There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.

    W 1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      In debug mode your program will be slower, will take more disk space and will take up more memory space. All this is filled with different types of "hooks" so that the program can be debugged, exposing extra internal functionality for the debugger to hold onto that will not be present in the release build.

      Develop in debug mode (although it is not mandatory) and distribute in release mode. NEVER EVER release debug builds, not only because they are larger and less efficient, but they expose the internals of your program, which may be exploited by people of ill intent :)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shoyeb
        wrote on last edited by
        #3

        so u want to say that we should develop our app in debug mode and release it in release mode.
        that sounds good.
        thank u.

        There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.

        1 Reply Last reply
        0
        • ? This user is from outside of this forum
          ? This user is from outside of this forum
          Guest
          wrote on last edited by
          #4

          Well, it sounds logical to release in release mode, don't you think :)

          Note that debug builds take more time, so on occasions you may chose to develop in release mode as well, and if you stumble upon a problem you can and should always do a debug build, which will allow you to walk through your code as your program executes. In debug mode you can add a break point anywhere in your program, at which point execution will halt, and you can continue executing line by line, stepping in and out of functions, different source code and so on, while watching variables in memory and many other tools to help you pinpoint a bug in your code.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            shoyeb
            wrote on last edited by
            #5

            yup :)
            thnx...

            There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              miroslav
              wrote on last edited by
              #6

              Those are the basics. Reality is slightly more complicated, in that there are different kind of release builds. For example you usually want to generate separate debug information for release builds so that QA can analyze crash reports, et cetera. These settings do not come with Qt Creator out of the box.

              The CMake documentation contains more information about that topic (search for RelWithDebInfo): http://www.cmake.org/Wiki/CMake_FAQ

              Mirko Boehm | mirko@kde.org | KDE e.V.
              FSFE Fellow
              Qt Certified Specialist

              1 Reply Last reply
              0
              • S Offline
                S Offline
                shoyeb
                wrote on last edited by
                #7

                thanx for the information..

                There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.

                1 Reply Last reply
                0
                • S shoyeb

                  Hi,

                  Can anyone tell me, what is the difference between DEBUG and RELEASE mode in the build configuration?

                  Please reply.

                  Thanks in advance...

                  W Offline
                  W Offline
                  walshmagger
                  Banned
                  wrote on last edited by
                  #8
                  This post is deleted!
                  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