Ubuntu Installation Configuration Xdebug method

Source: Internet
Author: User
Tags install php ini php download install perl

Installation method One, make configure

http://www.xdebug.org/download.php Download Linux Source

1 Decompression TAR-ZXVF xdebug.2.2.1.tgz

2 cd xdebug.2.2.1 install phpize sudo apt-get install Php5-dev

3 Run Phpize phpize

4./configure–enable-xdebug

5 Make

6 Make Install

7 Editor PHP.ini

[Xdebug]

Zend_extension=/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so

Xdebug.profiler_enable=on

Xdebug.trace_output_dir= ". /xdebug "

Xdebug.profile_output_dir= ". /xdebug "

Then look at the phpinfo will appear xdebug information

Configuration. xdebug.default_enable = 0来 shutdown xdebug defaults to 1 open

You can disable xdebug on a single page, just use xdebug_disable ();

Installation method Two, sudo apt-get

A, install PHP module and Xdebug module

Note: This assumes that the user has passed the apache2 and php5 through Apt-get install.

sudo apt-get install Php5-dev php5-cli

#其中php5-dev must be installed in order to install Xdebug.

sudo apt-get install php5-xsl

#Xinc需要xsl extension

sudo pecl install Xdebug

#编译成功说明已经安装完成

#如果上面的安装没有执行, then there should be a lack of Perl, then execute sudo apt-get install Perl

#编辑/etc/php5/apache/php.ini and/etc/php5/cli/php.ini joined

#zend_extension = "/usr/lib/php5/20060613+lfs/xdebug.so".

Sudo/etc/init.d/apache2 restart

#重启apache

B, install VIM plug-in

If VIM is not installed please install Vim:sudo apt-get install vim

CD ~/

#进入用户根目录

wget http://www.greatmoo.com/xdebug-plugin.tar.gz

#下载xdebug的vim插件

Tar zxvf xdebug-plugin.tar.gz

#解压

mkdir vim.

MV Plugin/. vim/

#建立vim用户配置目录, and install the plugin

C, use

1. Add the parameter "Xdebug_session_start=1" to the address you want to debug

2. Enter VI, press F5 to open the monitoring port

3. Operation Web Page

4. Into the VI interface, and then there is a hint of what you should do.

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.