News Feed
Sections




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

Joshua Thijssen:
Debugging remote CLI with phpstorm
December 24, 2012 @ 10:11:00

Joshua Thijssen has a recent post for all the PHPStorm users out there (or maybe investigating a new IDE) and are looking for a way to debug your PHP apps easily with XDebug. Well, he's come up with a step-by-step guide to help you get it all set up and working, complete with screenshots. He helps you debug command-line applications, but the setup will work for your web apps too.

Even in these days, with full-featured PHP IDEs around, I still see PHP developers using var_dump() and die() to debug their code. Not only is this a very bad way of "debugging", it has other dangers as well [...]. We've probably all been there,.. But we don't have to. Debugging your code properly through an IDE is quite easy, but one of the major problems is debugging CLI code. Since many frameworks like Zend, Symfony and micro-frameworks like Cilex can be used to create command-line apps, cronjobs and even "deamons", so how do we easily debug this kind of code?

He starts with the setup of a development instance (he recommends a clone-able virtual machine environment) and shows how o configure both XDebug and PHPStorm to work together happily. He shows what configuration options and steps you'll need to take to be able to debug the CLI apps too, including a command-line option to specify the IP to report the debugging into back into.

0 comments voice your opinion now!
commandline application debug xdebug phpstorm tutorial screenshots


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: Using PHP Streams Effectively

Rubayeet Islam's Blog: MySQL Prepared Statements and PHP : A small experiment

Hiveminds: How to Bridge PHP and Java for Powerful Web Solutions

RIA Development Center: Expression Web 2 for PHP Developers - Simplifying Your PHP Applications

IBM developer Works: PHP and RSS: Getting it together


Community Events

Don't see your event here?
Let us know!


podcast configure symfony2 introduction interview part2 opinion community framework conference php7 application release laravel library series api performance voicesoftheelephpant example

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework