Manu <turkey...@gmail.com> writes: > It's rare to step through optimised code. You tend to debug and step in debug/ > unoptimised builds, where inline functions are usually not even inlined, and > code flow still looks natural, and easy to follow.. This saves lots of time. > C/C++ macros present the same problem of not being able to step and inspect > values. Most industry programmers I work with tend to avoid macros for this > reason above all others.
I do it all the time. Normally I with optimized builds because our code takes a long time to run, so if I can find the problem without going to the debug build, I save a fair bit of time. I find that you get used to the weirdnesses that show up when stepping through optimized code. I'm probably able to find problems I'm looking for 60-70% of the time without resorting to using the debug build. Jerry