News for hackers. Stuff that matters.
Re:Computer Sciences Courses That Don't Exist, but Should by toast0 on Friday September 11, 2015 @01:29AM (#10202148)
printf debugging isn't the best method, but it's almost universally applicable. I don't always get to pick which part of my stack is broken, so I need to be prepared to debug in any language, and I don't have time to learn all the debuggers (or the patience to use gdb for everything -- I've debugged user space php with gdb... it's much quicker when I can just error_log my way to the source of the problem).
Re:Computer Sciences Courses That Don't Exist, but Should by girvo on Friday September 11, 2015 @11:51PM (#10207156)
Sure, I can appreciate that. But when you're talking about user-space PHP, why not leverage XDebug? Even using it as a "better" printf debugger, it's infinitely nicer than relying on "var_dump(); die;" -- and coupling it with any IDE or something like Codebug and you get a proper call stack to work with, variable inspection for the entire scope and even a REPL inside your live code at any point in your execution...