I have never used Xdebug, but i would like to start. I am using Ubuntu Linux and have already been able to:
phpinfo()
and var_dump()
in sublime settings:
"settings": { "xdebug": { "url": "http://your.web.server" } }
Here's what is going wrong:
What am I doing wrong?
these are the whole steps, worked for me
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
That is it!
Here is a very cool tool from Jetbrains, the makers of phpStorm:
http://www.jetbrains.com/phpstorm/marklets/index.html
Basically, just enter in the IDE key for your xdebug (or zend debugger if that's your thing) IDE and it will create bookmarklets to connect and enable the various functions.
For sublime text 2, the IDE key is:
sublime.xdebug
When you use the bookmarklets, you don't need enter in any server information on either end. Just "Start Debugger" on each and everything should work itself out, as long as you've left the default settings.
You still need to enable xdebug on your server of course.
您可以启用xdebug日志来调试xdebug。
I had a similar problem (I am running on Windows 7 though) and what worked for me was just making sure that I ran Sublime Text 2 as a Windows administrator. I believe this makes sense, since xDebug is a third-party dll to the system.
Maybe running sublime as a super user (using SUDO) might help in your case.
Hopefully this solves your problem.
Does your sublime also fail to save project settings, like the recent project list?
I had the same issue, you can see it here:
https://github.com/Kindari/SublimeXdebug/issues/69
The solution was to delete / move the ~/.config/sublime-text-2 folder then start again with a fresh sublime. After that, breakpoints looked normal and my debugger would connect :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.