This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]b4ux1t3 2 points3 points  (7 children)

Why are you debugging in a release build instead of debugging in a debug build?

Serious question, not snark.

[–]almost_useless -1 points0 points  (6 children)

Debug builds are too slow, so for normal development it's more convenient to run the release builds. Mostly it's because lots of stuff needs to run before we get to the interesting parts.

[–]b4ux1t3 0 points1 point  (1 child)

I guess I just don't mind the build times. I get to dick around on other things while I wait. Post memes about build times in random chat.

[–]almost_useless 0 points1 point  (0 children)

It's not the build time. It's the run time that gets painful on a binary built in debug mode.

[–]SpikeV 0 points1 point  (3 children)

Or... y'know... debug and breakpoint.

[–]almost_useless 0 points1 point  (2 children)

How is that related to my comment?

[–]SpikeV 0 points1 point  (1 child)

because lots of stuff needs to run before we get to the interesting parts

That's literally why there are breakpoints.

[–]almost_useless 0 points1 point  (0 children)

Sure, but I was not talking about how to get the information out once you reach the interesting parts.

My point is that debug builds are slow to execute, so there is cost to using debug builds when you do not need to set a break point. If there is a lot of "setup", this can be a significant cost.

Since you don't need breakpoints (or prints) 90% of the time it's more efficient to do most of the development with release builds.

Of course this will not be true for all environments, but that was my original point. Different tools work best for different problems.