在OS X上的PHP调试 - 绝望? [英] PHP debugging on OS X - hopeless?

查看:150
本文介绍了在OS X上的PHP调试 - 绝望?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试过:


  1. Xdebug和Eclipse。 Eclipse启动Web浏览器,但浏览器尝试访问Eclipse的.app包中不存在的文件。

  2. Xdebug和NetBeans。它有点好一点浏览器在/ tmp中打开一个页面,该页面显示启动,请稍候...,但没有任何反应。

  3. Xdebug和debugclient是Xdebug附带的CLI工具。 MacPorts(我以前用来安装PHP和Xdebug)本身似乎并不安装,当我尝试手动编译时,我被告知你有奇怪的libedit。通过MacPorts安装libedit并不能解决这个问题。

  4. Zend的调试器(确切的名字现在转过来)和Eclipse。我不记得那个问题是这样的,因为这是一段时间以前的事情,但是没有办法。

  1. Xdebug and Eclipse. Eclipse launches a web browser, but the browser tries to access a non-existent file in Eclipse's .app bundle.
  2. Xdebug and NetBeans. It does a little bit better; a browser opens a page in /tmp which says "Launching. Please wait…" but nothing happens beyond that.
  3. Xdebug and debugclient, the CLI tool which comes with Xdebug. MacPorts (which I used to install PHP and Xdebug) doesn't seem to install this by itself, and when I try compiling it by hand, I get told "you have strange libedit". Installing libedit via MacPorts doesn't solve that.
  4. Zend's debugger (the precise name escapes me right now) and Eclipse. I can't recall what the problem was, as this was some time ago, but it didn't work.

关于至少Xdebug,我确信我已经正确安装了。它显示在PHP文件中的phpinfo()和CLI中的 php -i

With regards to Xdebug, at least, I'm fairly confident I've installed it correctly. It shows up with both a phpinfo() in a PHP file and a php -i in the CLI.

如果任何人设法在Mac上以某种方式获得PHP调试工作,如果您能与我分享,我将不胜感激。垃圾代码与 var_dump($ foo); die(); 变得快速。如果可以使用某些诸如Eclipse的bloatware编辑器,或者Zend想要出售我的昂贵的专有资料,可以使用不使用获得积分。

If anyone has managed to get PHP debugging working in some way or other on the Mac, I'd appreciate it if you could share with me how. Littering code with var_dump($foo);die(); gets old quick. Bonus points if it can be done without using some bloatware editor like Eclipse, or that expensive proprietary thing Zend wants to sell me.

我的服务器通过FastCGI连接到PHP,如果这使得diff。

My server is connecting to PHP via FastCGI, if that makes a diff.

推荐答案

您可能需要查看 MacGDBp 。这是新的,免费的,UI看起来不错。它也使用Xdebug PHP扩展。您可以在帮助部分找到包含Xdebug配置的说明,还有这个应用程序的一个很好的概述来自于Particletree的人们:使用MacGDBp静音回声

You may want to look into MacGDBp. It's new, free, and the UI looks great. It utilizes the Xdebug PHP extension as well. You can find instructions in the help section, which includes Xdebug configurations, and there's also a nice overview of the app from the guys at Particletree here: Silence The Echo with MacGDBp.

这篇关于在OS X上的PHP调试 - 绝望?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆