Configuration for debugging using Xdebug in Netbeans

Source: Internet
Author: User
Tags netbeans

(This configuration can be used to solve the problem that netbean has been waiting for connection !)

1. Environment: windows server 2008 r2 enterprise x64

2. Install WAMP2.4 (installed on D: \ wamp) and Netbeans8.0

3. Three major configurations

3.1 configure php. ini

Zend_extension = "D:/wamp/bin/php/php5.4.12/zend_ext/php_xdebug-2.2.3-5.4-vc9-x86_64.dll"

[Xdebug]

Xdebug. remote_enable = On

Xdebug. profiler_enable = Off

Xdebug. profiler_enable_trigger = Off

Xdebug. profiler_output_name = cachegrind. out. % t. % p

Xdebug. profiler_output_dir = "D:/wamp/tmp"

Xdebug. remote_host = localhost

Xdebug. remote_port = 9000

Xdebug. remote_handler = dbgp

3.2 configure netbean debugging

3.2.1 restart the wamp service and open http: // localhost: 9060/(9060 is the apache port in wamp. You can go to httpd. conf), click phpinfo (), find xdebug, remember the value of ide key is WIN-BIBKMMO8PSU $

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 as 9000 (with php. in ini), session ID is configured as WIN-BIBKMMO8PSU $ (this is consistent with the idekey value of xdebug displayed in phpinfo in 3.2.1)

3.3 properties of the target 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 http: // localhost: 9060/project name/

Index file configuration: index. php

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.