krotfever.blogg.se

How to debug php in sublime text windows
How to debug php in sublime text windows














How to debug php in sublime text windows code#

As default PHP 4 and 5 do not show PHP notices which can be important in debugging your code (more on that shortly). Next, you will need to set an error reporting level. It is generally considered good practice to do so in files which contain only PHP code in order to avoid accidental injection of white space and the all too common “headers already sent” error. This can be done either in your php.ini file or at the head of your code like this: First, you should turn display_errors on. This is normally caused by a syntax error on a platform where the developer has not done their ground work properly. So, with that in mind lets talk about the all too common “I’m getting no error message” issue. In a live environment you neither want to confuse a genuine user or give malicious users too much information about the inner-workings of your site.

how to debug php in sublime text windows

This probably isn’t such a great idea, however, on your production server(s). For example, it is generally good practice to turn on a verbose level of error reporting on your development platform. It is important that you configure PHP correctly and write your code in such a way that it produces meaningful errors at the right time.

how to debug php in sublime text windows

This article breaks down the fundamentals of debugging in PHP, helps you understand PHP’s error messages and introduces you to some useful tools to help make the process a little less painful. If you want to build killer web apps though, it’s vital that you understand the process thoroughly. Nobody enjoys the process of debugging their code.














How to debug php in sublime text windows