I am newbie on PHP. Here is my situation. I write my code in vim and put it under /var/www/ then I can use
localhost/*.php
to run my code on browser.
When my code has bug. It just come out nothing.
How can I debug mu code like c++ or java?
Thanks.
Edited:
The link some friends provide is not helpful for me. I am under Linux. That's for Win.
Q: How to debug PHP in Chrome? A: You can easily debug PHP in Chrome using a simple extension called PHP Console. Just install this PHP debugging tool from the Chrome web store and start logging errors, warnings, exceptions, and vars dump on your Chrome browser.
Xdebug is a PHP extension which provides debugging capabilities. It uses the DBGp debugging protocol. Xdebug is a PHP extension which provides debugging and profiling capabilities. It uses the DBGp debugging protocol. At this end this tool is responsible to enable the debugging on PHP, and Xcode takes advantage of it.
include this both line in code to see what kind of error is.
<?php
ini_set("display_errors",1);
error_reporting(E_ALL);
//code goes here
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With