gpt4 book ai didi

php - xdebug、sublime-text-2 和 KindariSublimeXdebug

转载 作者:IT王子 更新时间:2023-10-29 01:02:28 26 4
gpt4 key购买 nike

我从未使用过 Xdebug,但我想开始。我正在使用 Ubuntu Linux 并且已经能够:

  • 安装 php5-xdebug 并确保它正常工作
    通过 phpinfo()var_dump()
  • 通过 Sublime 的包管理器安装插件
    我可以通过 SHIFT+F8 设置 Xdebug url
  • 访问插件的菜单
  • 在 sublime 设置中:

    "settings": {
    "xdebug": { "url": "http://your.web.server" }
    }

这是出了什么问题:

  • 我可以在代码中放置断点,但图标似乎不对,它只是一个橙色的 Blob
  • 当我“开始调试”时,调试窗口完全是空的
  • 当我访问我的脚本时,它不会在我的断点处停止。

我做错了什么?

最佳答案

这些是完整的步骤,对我有用

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

就是这样!

关于php - xdebug、sublime-text-2 和 KindariSublimeXdebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11779284/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com