Important: Please read the Qt Code of Conduct -

Debug and Release mode

  • Hi,

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

    Please reply.

    Thanks in advance...

  • 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 :)

  • 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.

  • 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.

  • yup :)

  • 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):

  • thanx for the information..

  • Banned

    This post is deleted!

Log in to reply