Debugging

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Daz
Forum Newbie
Posts: 18
Joined: Thu Mar 19, 2009 2:12 am

Debugging

Post by Daz »

Is there anything more to debugging php other than print_r and echo at the right spots? I've looked around at tutorials, and the majority of them just seem to cover that. I've found a few tutorials on how to use a particular php debugging script.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Debugging

Post by alex.barylski »

Dozens if not hundreds of things you can do in addition to print_r()

debug_backtrace() is one that doesn't need external libraries or tools. Profiling, code coverage, etc.

xdebug() is common

There are plenty more tools that help you write solid code, so debugging is loss of an issue fundementally, like design patterns, unit testing, stricter standards, conventions, etc.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Debugging

Post by Weirdan »

xdebug extension (http://xdebug.org) provides remote interactive debugging, profiling and tracing facilities.
Post Reply