Php_xdebug installation +netbeans configuration and use

Source: Internet
Author: User
Tags phpinfo vc9 netbeans


1, the installation and configuration of Php_xdebug:

I am using wampServer2.2 environment, the environment itself with the corresponding xdebug, only need to modify the configuration of php.ini can be. But php.ini file to find the right, I was the first to find the wrong file, so with a long time do not take effect.

The PHP configuration files used by Wampserver are usually placed in the Apache of the Wamp installation directory, and mine is in: D:\wamp\bin\apache\Apache2.2.21\bin\php.ini.

The location of php.ini can be viewed through the Phpinfo () method, and a direct search of php.ini is possible:

2, modify the php.ini

Zend_extension = "D:/wamp/bin/php/php5.3.10/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll"

#其中 Zend_extension=d:/php/ext/php_xdebug-2.2.1-5.4-vc9.dll is php5.3 and the above layout, if it is php5.2 and the following version is zend_extensi/php/ Ext/php_xdebug-2.2.1-5.4-vc9.dll.

[Xdebug]
Xdebug.remote_enable=on
Xdebug.remote_handler=dbgp
Xdebug.remote_host=localhost
xdebug.remote_port=9000

#下面是几个不必须的参数.

Xdebug.auto_trace=on
Xdebug.collect_params=on
Xdebug.collect_return=on
Xdebug.trace_output_dir= "D:/php/debuginfo"
Xdebug.profiler_enable=on
Xdebug.profiler_enable_trigger = Off
Xdebug.profiler_output_name = cachegrind.out.%t.%p
Xdebug.profiler_output_dir = "D:/wamp/tmp"
Xdebug.output_buffering=off

xdebug.idekey= "Ide.xdebug"

Trace_output_dir for a file similar to TRACE.4046332594.XT,
Profiler_output_dir corresponds to a file like cachegrind.out.10360.

You can then test for success with a phpinfo () function.

3, Configuration Netbean

3.2.1 Restarting the Wamp service

3.2.2 Open NetBeans, Tools-Options, find PHP icon, in "General" PHP5 interpreter select PHP in Wamp

such as: D:\wamp\bin\php\php5.4.12\php.exe

Hook-and-Choose: Output window, web browser

Open the Debug tab and configure the debug port to 9000 (as configured in php.ini)

4. Properties of the configuration item

3.3.1 Create a new project, right-click the project, open the Project Properties dialog box, select "Source", PHP version selected for Wamp in the same version of PHP

3.3.2 Select Run configuration, run as Select Local Web site, the project URL is configured as the access address for the project, such as: http://localhost:9060/project name/

The index file is configured as index.php

5, the use of Xdebug reference: Https://netbeans.org/kb/docs/php/debugging_zh_CN.html#gettingReady

Reference article: http://wayne173.iteye.com/blog/1704453

Http://www.2cto.com/os/201404/294008.html





The above describes the Php_xdebug installation +netbeans configuration and use, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

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