I am getting into a bit of PHP modification, namely my vBulletin forum software. In the Windows world there are tracking apps that allow you to see each function call as it happens giving you a flow of the app. Does this sort of thing exist for PHP? Oopensource would be very much preferred and something that runs on MAC even more so... Cheers Bruce
Best PHP built-in code execution tracing function is debug_backtrace. You may also want to check KCacheGrind (which works together with xDebug). Another solution is Zend Studio + Zend Server, it's not free, but gives you a very good insight.
if you really want to go deep, check out the tokenizer extension in PHP. you can do some really nifty, crazy stuff with it! you can also see http://us.php.net/manual/en/function.debug-print-backtrace.php and ALL of the error handling functions -- specifially set_error_handler() .. it may not look like you can do much with it on the outside, but do some digging and you surely can
Excellent thanks. I am almost done setting up my dev environment afresh on my Mac. Will try all these things out. Cheers Bruce
you can try the solution described here: http://pointphp.com/php-debugging-with-xdebug-dbgp-and-notepad-windows-t4.html Not sure if there is a version of notepad++ for Mac, but on windows you'd get a fully functional debugger with watch and step-by-step execution
as you can see from the screenshots from the link it has worked ok so notepad++ and DBGp plugin for it + xdebug. I believe there are some other solutions with xdebug for IDEs, but I tried that one since I'm using notepad++ now. Earlier I managed to install Zend Debugger and debug in Eclipse
I haven't finished my dev machine yet, damn medical stuff got in the way. I'll be trying either Eclipse or Coda as the dev environment, that is unless I can find something better that's opensource to replace Coda.... Hope to get started pretty soon though. Cheers RD