热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

xdebug,sublime-text-2KindariSublimeXdebug-xdebug,sublime-text-2andKindariSublimeXdebug

IhaveneverusedXdebug,butiwouldliketostart.IamusingUbuntuLinuxandhavealreadybeena

I have never used Xdebug, but i would like to start. I am using Ubuntu Linux and have already been able to:

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

  • install php5-xdebug and make sure it is working
    through phpinfo() and var_dump()
  • 安装php5-xdebug并确保它通过phpinfo()和var_dump()工作
  • install the plugin through Sublime's Package Manager
    I can access the plugin's menu through SHIFT+F8 setup the Xdebug url
  • 通过Sublime的Package Manager安装插件我可以通过SHIFT+F8设置Xdebug url来访问插件的菜单
  • in sublime settings:

    在崇高的设置:

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

Here's what is going wrong:

这就是问题所在:

  • I can place breakpoints in the code, but the icon seems to be wrong, it's just an orange blob
  • 我可以在代码中放置断点,但是图标似乎是错误的,它只是一个橙色的blob
  • When I "start debugging" the debug window appears completely empty
  • 当我“开始调试”时,调试窗口显示为完全空的
  • when I access my script, it doesn't stop at my break points.
  • 当我访问脚本时,它不会在断点处停止。

What am I doing wrong?

我做错了什么?

5 个解决方案

#1


5  

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!

这就是它!

#2


3  

Here is a very cool tool from Jetbrains, the makers of phpStorm:

这是来自Jetbrains公司的一个非常酷的工具,phpStorm的制造者:

http://www.jetbrains.com/phpstorm/marklets/index.html

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.

基本上,只需输入您的xdebug(或者zend debugger,如果您喜欢的话)IDE的IDE键,它就会创建bookmarklet来连接和启用各种功能。

For sublime text 2, the IDE key is:

对于崇高的文本2,IDE关键字是:

sublime.xdebug

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.

使用bookmarklet时,不需要在任何一端输入任何服务器信息。只要你保留了默认设置,每一个都要“启动调试器”。

You still need to enable xdebug on your server of course.

当然,您仍然需要在服务器上启用xdebug。

#3


0  

You can enable xdebug log to debug xdebug.

可以启用xdebug日志来调试xdebug。

#4


0  

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.

我也遇到过类似的问题(虽然我在Windows 7上运行),对我有用的只是确保我作为Windows管理员运行了出色的Text 2。我相信这是有意义的,因为xDebug是系统的第三方dll。

Maybe running sublime as a super user (using SUDO) might help in your case.

也许作为一个超级用户运行sublime(使用SUDO)可能对您的情况有所帮助。

Hopefully this solves your problem.

希望这能解决你的问题。

#5


0  

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

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 :)

解决方案是删除/移动~/。配置/ sublimetext -2文件夹然后重新开始一个新的崇高。之后,断点看起来是正常的,我的调试器将连接:)


推荐阅读
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • 本文介绍了在Python3中如何使用选择文件对话框的格式打开和保存图片的方法。通过使用tkinter库中的filedialog模块的asksaveasfilename和askopenfilename函数,可以方便地选择要打开或保存的图片文件,并进行相关操作。具体的代码示例和操作步骤也被提供。 ... [详细]
  • Python瓦片图下载、合并、绘图、标记的代码示例
    本文提供了Python瓦片图下载、合并、绘图、标记的代码示例,包括下载代码、多线程下载、图像处理等功能。通过参考geoserver,使用PIL、cv2、numpy、gdal、osr等库实现了瓦片图的下载、合并、绘图和标记功能。代码示例详细介绍了各个功能的实现方法,供读者参考使用。 ... [详细]
  • 31.项目部署
    目录1一些概念1.1项目部署1.2WSGI1.3uWSGI1.4Nginx2安装环境与迁移项目2.1项目内容2.2项目配置2.2.1DEBUG2.2.2STAT ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • 如何实现织梦DedeCms全站伪静态
    本文介绍了如何通过修改织梦DedeCms源代码来实现全站伪静态,以提高管理和SEO效果。全站伪静态可以避免重复URL的问题,同时通过使用mod_rewrite伪静态模块和.htaccess正则表达式,可以更好地适应搜索引擎的需求。文章还提到了一些相关的技术和工具,如Ubuntu、qt编程、tomcat端口、爬虫、php request根目录等。 ... [详细]
  • 本文介绍了lua语言中闭包的特性及其在模式匹配、日期处理、编译和模块化等方面的应用。lua中的闭包是严格遵循词法定界的第一类值,函数可以作为变量自由传递,也可以作为参数传递给其他函数。这些特性使得lua语言具有极大的灵活性,为程序开发带来了便利。 ... [详细]
  • GetWindowLong函数
    今天在看一个代码里头写了GetWindowLong(hwnd,0),我当时就有点费解,靠,上网搜索函数原型说明,死活找不到第 ... [详细]
  • 学习SLAM的女生,很酷
    本文介绍了学习SLAM的女生的故事,她们选择SLAM作为研究方向,面临各种学习挑战,但坚持不懈,最终获得成功。文章鼓励未来想走科研道路的女生勇敢追求自己的梦想,同时提到了一位正在英国攻读硕士学位的女生与SLAM结缘的经历。 ... [详细]
  • 如何使用Java获取服务器硬件信息和磁盘负载率
    本文介绍了使用Java编程语言获取服务器硬件信息和磁盘负载率的方法。首先在远程服务器上搭建一个支持服务端语言的HTTP服务,并获取服务器的磁盘信息,并将结果输出。然后在本地使用JS编写一个AJAX脚本,远程请求服务端的程序,得到结果并展示给用户。其中还介绍了如何提取硬盘序列号的方法。 ... [详细]
  • 使用Ubuntu中的Python获取浏览器历史记录原文: ... [详细]
  • 本文介绍了RPC框架Thrift的安装环境变量配置与第一个实例,讲解了RPC的概念以及如何解决跨语言、c++客户端、web服务端、远程调用等需求。Thrift开发方便上手快,性能和稳定性也不错,适合初学者学习和使用。 ... [详细]
  • 本文介绍了计算机网络的定义和通信流程,包括客户端编译文件、二进制转换、三层路由设备等。同时,还介绍了计算机网络中常用的关键词,如MAC地址和IP地址。 ... [详细]
  • 本文介绍了在使用Python中的aiohttp模块模拟服务器时出现的连接失败问题,并提供了相应的解决方法。文章中详细说明了出错的代码以及相关的软件版本和环境信息,同时也提到了相关的警告信息和函数的替代方案。通过阅读本文,读者可以了解到如何解决Python连接服务器失败的问题,并对aiohttp模块有更深入的了解。 ... [详细]
  • JavaScript和HTML之间的交互是经由过程事宜完成的。事宜:文档或浏览器窗口中发作的一些特定的交互霎时。能够运用侦听器(或处置惩罚递次来预订事宜),以便事宜发作时实行相应的 ... [详细]
author-avatar
游泳
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有