Directly go to the topic. The following configuration assumes that you have configured the PHP environment. 1. install the full version of Vim. If you have installed it, skip this step because Ubuntu only installs a reduced version of The Vimsudoapt-getinstallvim-full2 by default. run the: sudoapt-getinstallphp-pear3 if pecl is not installed on the machine. install and configure XDebugsudopeclinstallxdeb
Enter the topic directly. The following configuration assumes that you have configured the PHP environment.
1. Install Vim in the full version. If you have already installed Vim, skip this step because Ubuntu only installs Vim in the reduced version by default.
Sudo apt-get install vim-full
2. If pecl is not installed on the machine, run:
Sudo apt-get install php-pear
3. install and configure XDebug
Sudo pecl install xdebug
4. Add XDebug configuration in/etc/php5/apache2/php. ini.
Zend_extension =/usr/lib/php5/20090626/xdebug. so
Be sure to use your own path
Xdebug. remote_enable = on
Xdebug. remote_handler = dbgp
Xdebug. remote_host = localhost
Xdebug. remote_port = 9001
5. Restart the server
Sudo/etc/init. d/apache2 restart
6. Install the Vim Debugger plug-in
Http://www.vim.org/scripts/script.php? Script_id = 1, 1929
Copy debugger. py and debugger. vim In the plugin directory to the $ HOME/. vim/plugin directory.
7. Set the port number to be listened on by the dbgp client in the. vimrc file.
Let g: debuggerPort = 9001
8. Run vim to open the Php source file and set the breakpoint in one line.
: Bp
Press F5 and enter http://www.linuxidc.com/yourphp in your browser in 5 seconds? XDEBUG_SESSION_START = 1
VIM enters the single-step execution stage
The configuration is complete here, and I feel that this is not very useful.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2