PHP Debugging Issues

Source: Internet
Author: User
Keywords Php
usually Echo,var_dump,exit,die (). To debug, so the commissioning efficiency is extremely under. Today try XDEBUG+SUBLIMT debugging, found that is also not good use of the Lord.
That's how you debug. Are we PHP, Var_dump. Debug?

Reply content:

usually Echo,var_dump,exit,die (). To debug, so the commissioning efficiency is extremely under. Today try XDEBUG+SUBLIMT debugging, found that is also not good use of the Lord.
That's how you debug. Are we PHP, Var_dump. Debug?

xdebugJust with a regular IDE , otherwise use up and gdb no difference. With a PhpStorm kind of IDE , breakpoints, stepping, variable details are very simple operation, than echo , var_dump this by guessing debugging is much more convenient.

I'm just using this to debug Beaver the Https://github.com/funcuter/beaver.

Echo,var_dump,exit,die ()
Not particularly complex applications, small sites what enough,

chromephp Plugin &chromephp.php Class Library

https://github.com/ccampbell/chromephp

Download chromephp.php

Then create a new PHP file, such as 1.php

include 'ChromePhp.php';ChromePhp::log('Hello console!');ChromePhp::log($_SERVER);ChromePhp::warn('something went wrong!');

Chrome App Store install chromephp plugin (to flip)

Then open a new tab, light the chromephp plugin

Enter a URL to see the debug output under the Chrome Dev Tool console tab, my results

Use Phpstrom bar, debugging function is very powerful, such as power-off debugging. My favorite.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.