tags:

views:

774

answers:

3
+2  Q: 

How to debug in VI

Using vim 7.1, I recently heard you can debug php in VI. But how?

+2  A: 

If you are referring to debugging vim script, vim -D is a first step.

More details in Debugging Vim Scripts.

VonC
+2  A: 

See the link on using xdebug with vim that someone else posted for a full debugger, but as an extra tip you can do this from vim to run syntax check on the current PHP script:

:!php -l %

I have this assigned to my F5 key by putting this in my .vimrc file (in your home(~) directory):

nmap <F5> :! php5 -l %<CR>
Wesley Mason