Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Juan Treminio's Blog:
Xdebug and You: Why You Should be Using a Real Debugger
Jul 05, 2012 @ 13:52:13

If you've been working with PHP for any length of time, you know that one of the issues the language has shows up when you're trying to debug your applications. Thankfully, as Juan Treminio points out, there's a better way - Xdebug.

Xdebug is a PHP extension that was written and is maintained by Derick Rethans. It provides debugging and profiling capabilities, although I’ll be mostly focusing on the debugging aspects in this tutorial. With it you can set a breakpoint and pause the execution of a script to see the state of your application at that exact point, including what variables/objects have been instantiated and what their values are. Xdebug completely replaces the need to litter your code with echo, print_r() or var_dump() calls, and displays information on all variables, not just the one you passed.

He talks some about the current state of IDE/editor support for the tool and shows how to get it installed and your php.ini configured to use it. XDebug make it easy to turn on/off debugging thanks to a handy browser-based switch. He links to a bookmarklet you can use to make it a one-click operation. He includes the setup for using the debugging in PHPStorm, but it's pretty similar for most of the IDEs out there.

tagged: xdebug debugging install configure ide bookmarklet

Link:

Evan Sims' Blog:
Introducing SmugURL
Apr 23, 2008 @ 15:23:35

Evan Sims, a recent convert from Flickr to SmugMug, has whipped up a little something to help make getting to those SmugMug unfriendly URLs a little bit easier - SmugUrl:

one aspect I didn't like was their URL scheme. They have good reasons for doing it, and I can't fault them for trying to maintain the privacy and security of their users. Heck, I applaud them for it. Still, I like my URLs pretty, and more importantly search engine friendly. So, I decided to take matters into my own hands and build SmugURL.

His example replaces this - http://evansims.smugmug.com/gallery/4717671_Ywtjp#279209234_a2ALu - with this - http://smugurl.com/evansims/myst_online...much more readable. He's even created a little bookmarklet you can drop into your bookmarks to make creating the URLs quick and easy. Check out for more.

tagged: smugurl smugmug photo hosting url rewrite bookmarklet

Link:

Davey Shafik's Blog:
Debugging from Firefox with xdebug and Komodo
Nov 16, 2007 @ 18:03:00

Davey Shafik has shared a method he's come up with for debugging directly from Firefox with the help of xdebug and the Komodo IDE.

In an effort to switch away from Zend Studio I have been trying out Komodo (again) [...] One of the last barriers to switching, has been to emulate the Zend Studio Toolbar for Firefox (also available for IE) which lets you do lots of great things, from Profiling to Debugging every page. I personally use it mostly for debugging single pages, and forms, as well as for end to end PHP and AJAX debugging - so this was the feature I was mostly looking to emulate.

He found his way through a few small additions to his php.ini file that allow Komodo to connect directly to the remote server and make debugging as easy as adding "?XDEBUG_SESSION_START=1" to the URL of whatever page you're on. He's also made a bookmarklet that turns it on for you as well.

tagged: debug firefox komodo xdebug bookmarklet debug firefox komodo xdebug bookmarklet

Link:

Davey Shafik's Blog:
Debugging from Firefox with xdebug and Komodo
Nov 16, 2007 @ 18:03:00

Davey Shafik has shared a method he's come up with for debugging directly from Firefox with the help of xdebug and the Komodo IDE.

In an effort to switch away from Zend Studio I have been trying out Komodo (again) [...] One of the last barriers to switching, has been to emulate the Zend Studio Toolbar for Firefox (also available for IE) which lets you do lots of great things, from Profiling to Debugging every page. I personally use it mostly for debugging single pages, and forms, as well as for end to end PHP and AJAX debugging - so this was the feature I was mostly looking to emulate.

He found his way through a few small additions to his php.ini file that allow Komodo to connect directly to the remote server and make debugging as easy as adding "?XDEBUG_SESSION_START=1" to the URL of whatever page you're on. He's also made a bookmarklet that turns it on for you as well.

tagged: debug firefox komodo xdebug bookmarklet debug firefox komodo xdebug bookmarklet

Link:


Trending Topics: