Jump to content

PHP error debugging


colombian

Recommended Posts

I have been working with PHP for a while, but never gone through getting a good debugger - or debugging methodology.

 

Can someone send me links to suggestions and possibly good (free) software?

 

I am not hosting the website, so I cannot tell it to report all errors directly from the installation.

I tried

error_reporting(E_ALL ^ E_NOTICE);

on top of the page, but that does nothing. So it always takes a while for me to fix the errors.

 

Any help and hints appreciated (remember I cannot control the installation directly).

 

 

Link to comment
Share on other sites

I don't personally use it but IDE's such as Eclipse can be configured to use a debugger so that you can insert breakpoints and step through your code line by line.

 

The other alternative is to use echo statement's to trace where errors occur (even logic which default error messages won't usually tell you unless it breaks something). Sometime's it's helpful to do something like this echo "<script type='text/javascript'>alert($variable);</script>"; that way if your page redirects or something it's got to wait for you to say ok before moving forward and you'll be able to see  your variables.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.