News for hackers. Stuff that matters.
Re:Comparing Pythagorean triples in C++, D, and Rust by saagarjha on Monday December 31, 2018 @02:31PM (#18796405)
I mean, why can't you just call that in the debugger when you need it?
Re:Comparing Pythagorean triples in C++, D, and Rust by burntsushi on Monday December 31, 2018 @02:33PM (#18796416)
Why 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.

Re:Comparing Pythagorean triples in C++, D, and Rust by saagarjha on Monday December 31, 2018 @02:44PM (#18796494)
> 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?

Re:Comparing Pythagorean triples in C++, D, and Rust by steveklabnik on Monday December 31, 2018 @03:02PM (#18796618)
> 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.

Re:Comparing Pythagorean triples in C++, D, and Rust by burntsushi on Monday December 31, 2018 @02:51PM (#18796551)
> Sounds like a job for a profiler?

Sometimes yes. Sometimes no.

Re:Comparing Pythagorean triples in C++, D, and Rust by pjmlp on Tuesday January 01, 2019 @05:41AM (#18799681)
Borland even used to have a few marketing ads about JIT debugging, by making use of Dr. Watson infrastructure on Win16.