Hbuilder using Xdebug to configure PHP breakpoint debugging

Source: Internet
Author: User
Tags vc9

1. Background

Have to say that Hbuilder is a free front-end development tools in the more useful, and with Aptana development PHP is also so-so (after all, write the front-end more). I originally was to do Java, and then intend to do some personal projects with PHP (because the server cost is low), so quickly get started PHP. But as a dynamic language, that retarded development tools and code hints let us this accustomed to eclipse javaer eggs, often because of some inexplicable errors and find no reason, although know can be configured with Xdebug and Zenddebug debugging breakpoints, but has not been configured successfully before. Today because a bug is really headache, not critical error, just a logical problem, if in multiple files hundreds of lines of code to go to Var_dump, deleted the change to delete is too painful, so determined to see again try to configure PHP breakpoint debugging.

2. Operation procedure
    1. First to Xdebug official website download and your PHP version consistent xdebug extension, my is php-5.4.29-win32-vc9-x86, so the download is php_xdebug-2.2.5-5.4-vc9.dll.

    2. Copy the Php_xdebug-2.2.5-5.4-vc9.dll to the PHP directory and I copy it to D:\PHP\php_xdebug-2.2.5-5.4-vc9.dll.

    3. Modify the php.ini configuration as follows, I closed the configuration of some saved analysis files, so that the site speed impact less.

      [Xdebug]; your Xdebug file path, do not have spaces and Chinese names and so on, no need to say more. Zend_extension=d:/php/php-5.4.29-win32-vc9-x86/php_xdebug-2.2.5-5.4-vc9.dll; turn on automatic tracking xdebug.auto_trace = Off; Turn on exception tracking Xdebug.show_exception_trace = Off, turn on remote debugging auto start Xdebug.remote_autostart = on; Turn on remote debugging xdebug.remote_enable = on; Collect variable xdebug.collect_vars = off; collect return value Xdebug.collect_return = off; collect parameters Xdebug.collect_params = Offxdebug.trace_output_ Dir= "D:/php/php-5.4.29-win32-vc9-x86/projecs" xdebug.profiler_enable=offxdebug.profiler_output_dir= "D:/PHP/ Php-5.4.29-win32-vc9-x86/projecs "XDEBUG.REMOTE_HOST=LOCALHOSTXDEBUG.REMOTE_PORT=9000XDEBUG.REMOTE_HANDLER=DBGP
    4. Modify the Hbuilder configuration.

Only need to change the port number to php.ini inside the configuration of the line, and then add a breakpoint on the PHP file, access to the browser, see if it will stop ...

One thing to add is that PHP's maximum execution time under Windows seems to be 30 seconds, which may affect debugging, and mine has changed to max_execution_time=6000
It's been 100 minutes. If you have a problem, you can change it to a larger point.

Hbuilder using Xdebug to configure PHP breakpoint debugging

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.