3 ms·
I mean, why can't you just call that in the debugger when you need it?
by saagarjha 8y ago
I mean, why can't you just call that in the debugger when you need it?
- burntsushi 8y agoWhy spin up a debugger when I can just printf it? :-) As others have mentioned, how do debuggers fair on optimized builds? Most of my time "debugging" is specifically spent on optimized builds looking at performance issues.
- saagarjha 8y ago> Why spin up a debugger when I can just printf it? Xcode launches into a debugger by default, so it's not really an extra step for what I usually do. > As others have mentioned, how do debuggers fair on optimized builds? Not well, if you are planning to have variable names and stepping work correctly. > Most of my time "debugging" is specifically spent on optimized builds looking at performance issues. Sounds like a job for a profiler?
- burntsushi 8y ago> Sounds like a job for a profiler? Sometimes yes. Sometimes no.
- steveklabnik 8y ago> Sounds like a job for a profiler? Consider the similarities between profilers and printf debugging; both of them run your code, and spit out some kind of log, whereas debuggers stop your code in the middle of execution. Workflow wise, they're pretty much the same, even if their objectives are a bit different.
- pjmlp 8y agoBorland even used to have a few marketing ads about JIT debugging, by making use of Dr. Watson infrastructure on Win16.