[PHP] how to use xdebug to Debug php in NetBeans

Source: Internet
Author: User
Tags netbeans
[PHP] how to use xdebug to Debug php in NetBeans. In fact, the article focuses on how to configure the xdebug environment of php. after all, the environment is ready, such as the IDE such as NetBeans and Eclipse, any one can Debug php.

Operating Environment:

OS: Ubuntu 10.04

Server: xampp 1.7.3a

1. download xdebug. so

It is convenient for lazy people and does not need to compile, so a 32-bit xdebug. so is provided.

Http://download.csdn.net/source/2757538

After the file is downloaded, place the file (note that this is different from the path for installing xamp, which is a general installation path)

/Opt/lampp/lib/extensions

2. configure php. ini

Open/opt/lampp/etc/php. ini and add the following content:

Code

                      

zend_extension =/ opt / lampp / lib / php / extensions / xdebug.so[debug]; Remote settingsxdebug.remote_autostart = offxdebug.remote_enable = onxdebug.remote_handler = dbgpxdebug.remote_mode = reqxdebug.remote_host = 127.0 . 0.1 xdebug.remote_port = 9000 ; Generalxdebug.auto_trace = offxdebug.collect_includes = onxdebug.collect_params = offxdebug.collect_return = offxdebug.default_enable = onxdebug.extended_info = 1 xdebug.manual_url = http: // www.php.netxdebug.show_local_vars = 0 xdebug.show_mem_delta = 0 xdebug.max_nesting_level = 100 ;xdebug.idekey = ; Trace optionsxdebug.trace_format = 0 xdebug.trace_output_dir =/ tmpxdebug.trace_options = 0 xdebug.trace_output_name = crc32; Profilingxdebug.profiler_append = 0 xdebug.profiler_enable = 0 xdebug.profiler_enable_trigger = 0

3. remember to restart the server!

                  

sudo / opt / lampp / lampp restart

4. open a project with NetBeans, add breakpoints, and debug!

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.