Configure and use php_xdebug installation + NetBeans

Source: Internet
Author: User
Tags vc9 netbeans
: This article mainly introduces the configuration and use of php_xdebug installation + NetBeans. if you are interested in the PHP Tutorial, refer to it. Zookeeper

1. install and configure php_xdebug:

I use the wampServer2.2 environment. the environment itself comes with the corresponding xdebug. you only need to modify the configuration of php. ini. However, the php. ini file is correct. I found the file incorrectly at the beginning, so the configuration does not take effect for a long time.

The php configuration files used by wampServer are generally stored in apache in the wamp installation directory. my files are: D: \ wamp \ bin \ apache \ Apache2.2.21 \ bin \ php. ini.

You can use the phpinfo () method to view the php. ini location and directly search for php. ini:

2. modify php. ini

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

# Where zend_extension = D:/php/ext/php_xdebug-2.2.1-5.4-vc9.dll is php5.3 and the above layout, if 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

# The following are optional parameters.

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 is a file similar to trace.4046332594.xt,
Profiler_output_dir corresponds to files like cachegrind. out.10360

Then you can use a phpinfo () function to test whether the operation is successful.

3. configure netbean

3.2.1 restart the wamp service

3.2.2 open netbeans, tool -- option, find the php icon, and select php in wamp in "regular" PHP5 interpreter

For example, D: \ wamp \ bin \ php \ php5.4.12 \ php.exe

Hook: Output window, web browser

Open the debug tab and configure the debug port to 9000 (same as the configuration 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", and set the PHP version to be consistent with the php version in wamp.

3.3.2 select "run configuration" and "local web site" as the Running mode. the Project URL is configured as the Project Access address, for example, http: // localhost: 9060/project name/

Index file configuration: index. php

5, xdebug use reference: https://netbeans.org/kb/docs/php/debugging_zh_CN.html#gettingReady

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

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

Zookeeper

Zookeeper

The above introduces the configuration and use of php_xdebug installation + NetBeans, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

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.