Skip to content

Instantly share code, notes, and snippets.

@mdjhny
Created April 27, 2013 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdjhny/5471950 to your computer and use it in GitHub Desktop.
Save mdjhny/5471950 to your computer and use it in GitHub Desktop.
利用sublime,xdebug,chrome调试php
sudo -i
apt-get install php5-xdebug
vim /etc/php5/conf.d/xdebug.ini
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
:wq
apachectl restart
exit
Download do SublimeXdebug
unzip
move folder para ~/.config/sublime-text-2/Packages/Xdebug
Download python 2.6 (careful with i386 vs amd64)
dpkg-deb -x python2.6_2xxxx.deb python2.6
move folder to ~/sublime/lib/python2.6
open google chrome
chrome://settings/extensions
Get more extensions
search for xdebug
install xdebug helper
go to "options" of xdebug helper
in IDE type "other" and in input "sublime.xdebug"
start sublime
open file test.php
add breakpoints
start debugging
in chrome go to http://localhost/test.php
activate the icon of the plugin
refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment