Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would I start a debug build without debugging?

Is there any benefit in starting a debug build without debugging (as opposed to a release build without debugging)? And what do I miss when I debug a release build (as opposed to debugging a debug build)?

like image 543
fredoverflow Avatar asked Feb 27 '23 00:02

fredoverflow


1 Answers

Biggest advantages of debug builds (outside of the IDE):

  • Assertions are enabled, as is other diagnostic code you may have compiled within debug-dependent prepocessor sections.
  • Stack traces and variable watches are working properly, so you can have beta testers send you a crash dump and debug that in your IDE later.

Biggest disadvantages:

  • Slow execution, higher memory consumption, bigger file size.
  • Some bugs are not evident unless you compile everything with full optimization. That's because memory allocation is working differently in release builds.

Many companies distribute debug builds to alpha and beta testers and switch to release builds later.

like image 164
Adrian Grigore Avatar answered Mar 07 '23 13:03

Adrian Grigore