NetBeans Configuration Xdebug

Source: Internet
Author: User
Tags php windows netbeans

This article has been updated to see

Windows environment configuration xdebug Debugging PHP Windows environment

Or

NetBeans configuration xdebug remote debugging PHP Linux Environment

Nebeans configuration Xdebug can facilitate our step-by-step view of the operation of the program is very advantageous to our debugging program is the following I will introduce the process of configuration.

to install Xdebug first, you can refer to this: http://blog.csdn.net/21aspnet/article/details/6753794

Locate the php.ini in the phpinfo () information and open php.ini Add the following code at the end of the document:

Xdebug.remote_enable=on
Xdebug.remote_handle=dbgp
Xdebug.remote_host=localhost
xdebug.remote_port=9001

Find tools in NetBeans menu---option will pop up a box will appear a Web browser to choose Firefox or IE and then find and PHP in the same line of the box click PHP then you will see a general, Unit test, Symfony , click on the General page to find the debugger port to write the port as in your php.ini configuration of the same port to determine.

Open your own project file in NetBeans find a line set to a breakpoint,

Then select Debug File NetBeans

A running netbeans-xdebug prompt appears in the lower-right corner and then F7 to see how the program is going to run next.

Take the following code as an example:

$a =array (' AA ', ' BB ', ' cc ');
$a [3]= "DD";
For ($i =0 $i <4; $i + +)
{
   echo $a [$i]. " </br> ";
}


Start debugging, press F7 Single Step debugging

Right-click to add monitoring on variables that need to be monitored

See very clearly in the Watch window:

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.