PHP vagrant Vim xdebug Configuration

Source: Internet
Author: User
Tags crc32
I. Installation of XDEBUG


1, compile and install Xdebug, you can also use pecl install Xdebug

 
wget http://xdebug.org/files/xdebug-2.3.2.tgz
tar-zxvf  xdebug-2.3.2.tgz
cd  xdebug-2.3.2
Phpize
./configure--enable-xdebug--with-php-config=/data/php/bin/php-config make
&& make install


Php-config's path must be your Php-config path.


2. Fill in the following stuff into your php.ini

Zend_extension=/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
; Remote settings
 xdebug.remote_autostart=on
 xdebug.remote_enable=on
 xdebug.remote_handler=dbgp
 Xdebug.remote_mode=req
 xdebug.remote_host=192.168.61.162
 xdebug.remote_port=9000

; General
 Xdebug.auto_trace=off
 xdebug.collect_includes=on
 xdebug.collect_params=off
 Xdebug.collect_return=off
 xdebug.default_enable=on
 xdebug.extended_info=1
 xdebug.manual_url= Http://www.php.net
 xdebug.show_local_vars=0
 xdebug.show_mem_delta=0
 xdebug.max_nesting_level=
 xdebug.idekey=

; Trace options
 xdebug.trace_format=0
 xdebug.trace_output_dir=/tmp
 xdebug.trace_options=0
 XDEBUG.TRACE_OUTPUT_NAME=CRC32

; Profiling
 xdebug.profiler_append=0
 xdebug.profiler_enable=0
 xdebug.profiler_enable_trigger=0
 xdebug.profiler_output_dir=/tmp
 xdebug.profiler_output_name=crc32

xdebug.remote_connect_back = On
Xdebug.idekey = "vagrant"


Precautions:



3.vim Bundle Configuration

~/.VIMRC need to configure this

Plugin ' Joonty/vdebug '

If you install Vundle or VIMRC configuration, you can refer to my other posts.


4.PluginInstall vundleupdate Vundleinstall in the vim low-level command line mode all the time to install a wave


5. Httpd/nginx must reboot to be effective php.ini


6.vim xx.php


7. Press F5


8. At the back of your website, the browser enters

Http://develop.xxx.com/?XDEBUG_SESSION_START=1


9.enjoy

\


Xdebug probably document

Https://mutelight.org/minimal-guide-to-debugging-php-with-xdebug-and-vim



##########

GitHub use documentation for this plugin

Https://github.com/joonty/vdebug

Related Article

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.