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
https://forums.phpfreaks.com/topic/64697-php-error-debugging/
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
https://forums.phpfreaks.com/topic/64697-php-error-debugging/#findComment-322663
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.