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. [Split] Debug vs. Release
Forum Updated to NodeBB v4.3 + New Features

[Split] Debug vs. Release

Scheduled Pinned Locked Moved General and Desktop
10 Posts 5 Posters 8.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.
  • A Offline
    A Offline
    afterforeverx
    wrote on last edited by
    #1

    I have another question. If this problem is hard to solve( my another thread: http://developer.qt.nokia.com/forums/viewthread/9300/ ), is it possible to give another people to use my software, compiled in debug mode??? Are there many differencies between debug and release mode?

    [Edit: Split this into its own thread. Please use new threads for new topics; mlong]

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Tupla
      wrote on last edited by
      #2

      Debug mode includes debug information, which are necessary to debugging software (like gdb) in order to work properly (setting up breakpoints and watchpoints, for example). One drawback is that an executable compiled in debug mode will occupy more disk space.
      It's better to give people your source code and let them build it in debug mode, on their own.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        afterforeverx
        wrote on last edited by
        #3

        If I don't use breakpoints, watchpoints, how much more circa disk space it will use?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Tupla
          wrote on last edited by
          #4

          I wasn't clear, sorry. Breakpoints and watchpoints are set up by specific command in the debugger, during the debugging process, they do not affect size of the executable.
          Debug information (symbols) are used by the debugger to detect memory location for variables and instructions.
          To give you an idea, I have a small application which if compiled in debug mode takes 697 KiB, if compiled in release mode takes 295 KiB. For larger projects (more files, classes and functions), it may increase.
          I have compiled a "big" application in debug mode, size is 20.4 MiB. In release it's only 2.3 MiB.
          Just to give you an idea of the difference between release and debug ;-)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            Be aware, that you might not be allowed to distribute debug versions of your applications and/or the need libraries due to licensing restrictions!

            At least for Visual Studio this is not possible:

            bq.. From http://msdn.microsoft.com/en-us/library/8kche8ah.aspx

            You cannot redistribute all of the files that are included in Visual Studio; you are only permitted to redistribute the files that are specified in Redist.txt. Debug versions of applications and the various Visual C++ DLLs are not redistributable.

            p. If your test users do not have a debugger running, why do you want to distribute a debug version of your application?

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • A Offline
              A Offline
              afterforeverx
              wrote on last edited by
              #6

              I don't use Visual C++ DLLs(I use MinGW compiler, Qt Creator(Qt dll's), swedll32.dll(GNU GPL License)). I want to distribute a debug version, because it is working always correct without any problems. Release version crashed and nowbody know why(I try to solve this problem myself more, than 2 weeks, but I cann't / I have an small example in this topic http://developer.qt.nokia.com/forums/viewthread/9300/ ). I can distribute debug version or try to change Gui toolkit or(and) Compiler, but I like Qt. I don't see another choices.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #7

                Regarding MinGW and Qt there is no restriction that I'm aware of (I'm not a lawyer!).

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlong
                  wrote on last edited by
                  #8

                  I would advise against distributing a debug version because it happens to work when the release version does not. That indicates that there is still a bug in your code, but (possibly just by chance) the debug version is masking it, with the possibility that it might show itself at another time when least expected.

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on last edited by
                    #9

                    And (additionally) Qt debug dlls are really huge (QtCore 2,5 MB release, 30 MB debug, QtGui 95, MB release, 150 MB debug). Regarding only those 2 dlls, it makes absolutly no sense to distribute debug versions. I suggest you try to find the bug by debugging your app and solve it.

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      afterforeverx
                      wrote on last edited by
                      #10

                      mlong, Gefolf can you may be see my small example ( last post in thread: http://developer.qt.nokia.com/forums/viewthread/9300/ ) and say, what I do wrong? Where can bug be??? I cann't find myself, what I do wrong in this(small) example too....

                      I think, that it is a compiler problem or I'm too stupid to find my bug.

                      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