Debugging PHP
I was a fan of Zend Studio 5.5, but for whatever reason, Zend Studio 7, with all its Eclipse-iness, just doesn't do it for me. I don't do much coding these days, so I've stuck with my beloved TextMate, even though I missed the full suite of functionality - especially debugging.
But now that I've finally gotten around to installing Xdebug and MacGDBp (following instructions on TechnoSophos) I may uninstall Zend altogether. It's lighter, it's quick, and it will be plenty for the little bit of debugging that I need to do.
The only complaint I have thus far is that I can't seem to get the xdebug.file_link_format option to work:
xdebug.file_link_format = "txmt://open?url=file://%f&line=%l"
That txmt:// link should be included in stack traces in the browser, so that clicking on the name of the offending file will open it in TextMate to the right line, but it's not using the specified format. The Xdebug documentation claims that it wasn't introduced until Xdebug 2.1...but the latest version is only 2.0.5. It's a minor thing, but it would be nice.
So I'm content. It's not perfect, but it'll do. And don't bother wasting your time to tell me I should be using vim - I loves me some TextMate.
Use vim!
Use vim!
I use a small javascript that
I use a small javascript that I wrote to account for a similar issue I have with the txmt links not showing up. I set it to run in greasemonkey when a page on my dev domain runs.
Here is the code I hope it helps you:
<
pre>
stripHTML = function(inputText)
{
// What a tag looks like
var matchTag = /<(?:.|\s)*?>/g;
// Replace the tag
return inputText.replace(matchTag, "");
};
linkup = document.getElementsByTagName('th')[0];
text = linkup.innerHTML;
f = text.substr(text.indexOf('/Volumes'), text.indexOf(' ', text.indexOf('/Volumes'))-text.indexOf('/Volumes'));
l = parseInt(stripHTML(text.substr(text.indexOf('line ', text.indexOf(f))+5,10)));
linkup.innerHTML = text.replace(f, '' + f + '');
theArray = document.getElementsByTagName('td');
i = 0;
for ( var item = theArray[0]; theArray.length > i; item = theArray[++i] )
{
if ((typeof item.title) != 'undefined' && item.title.indexOf('/Volumes') > -1) {
l=parseInt(stripHTML(item.innerHTML.substr(item.innerHTML.indexOf(':')+1,10)))
item.innerHTML = '' + item.innerHTML + '';
}
<
pre>
Wow, thanks Jonathan! I'll
Wow, thanks Jonathan! I'll give that a shot!
Eclipse Helios is much faster
Eclipse Helios is much faster and better. They have fixed many of the bugs and the integration with xdebug is excellent. I have switched over to it for all my development work.
Post new comment