0

EDIT: Like I said, Xdebug type responses are not really that helpful here. I've added some more info below:

I am planning on writing a small PHP debugging solution and would like to poll Stack Overflow for some ideas before I get started. The goal is to simplify debugging a PHP based web app.

The tool should be able to plug into an existing web app and to display and traverse a PHP backtrace. I'd probably implement it in PHP (and potentially with the help of some javascript). Some php functions that come to mind: set_error_handler() and debug_backtrace().

Generally the idea is a lightweight debugging tool that's easy to configure, doesn't require root on a dev box, and/or any of the other overhead associated with server side debuggers like xdebug.

Some of the things open for discussion may include:

  1. Nice to have functionality/features for a GUI that does this sort of thing.
  2. What are considerations when plugging in this tool into another app I might be developing? (for debugging purposes.
  3. Ideas on how the integration between the GUI and the app I want to debug.

I am open to other suggestions as well, like, this has already been done, this is stupid, and why not just use xdebug/echo debugging. (Ok, maybe not really the last two, but depending on the quality of the response I might consider it :).

5
  • 7
    xdebug.org Commented Feb 12, 2010 at 20:32
  • Second Xdebug... or Zend Debugger. I wouldnt even think of writing it myself unless it was for thesis or something. Commented Feb 12, 2010 at 20:34
  • zend.com/en/community/pdt Zend debug plugin (i.e. for eclipse) Commented Feb 12, 2010 at 20:34
  • What your tool would do that the actual don't ? Commented Feb 12, 2010 at 20:34
  • As others have said, why re-invent the wheel? PHP is debugging is fairly good with NetBeans and xdebug. It is unlikely a homegrown tool would work better, unless you are able to work full time on it for an extended period of time... It would be a great learning experience though. Commented Feb 12, 2010 at 20:44

3 Answers 3

1

You could take a look at FirePHP, a plugin for FireFox's Firebug. Supposedly it can be used for debugging and tracing. I could be wrong - haven't used it yet.

Sign up to request clarification or add additional context in comments.

Comments

1

It would be really nice to be able to dump arrays or objects to a logger at specified execution points (eg when returning from a method):

$your_tool->log_this_var("var_name" => "var", "log_at" => array("return_from" => "aMethod"));

And view them later:

foreach($var_log['saved_states'] as $key => $val): print_r($val); 

Comments

0

Not sure why everyone is commenting this one instead of answering, with xdebug.org. There's no point in recreating the wheel with other frameworks out there for you to use. You could spend months on creating your own.

To meet your GUI needs, it's possible with 3rd party clients.

I'd give it or Zend a try before going it alone. Either one will likely do 95% of what you need. :)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.