<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 12 Feb 2012 19:30:47 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Mark Hamlin's Blog: Debugging xdebug (tcp, dns, ubuntu, osx, vmware) ((all at once))]]></title>
      <guid>http://www.phpdeveloper.org/news/16799</guid>
      <link>http://www.phpdeveloper.org/news/16799</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Mark Hamlin</i> talks about <a href="http://uber-code.blogspot.com/2011/08/more-debugging-xdebug-tcp-dns-ubuntu.html">some of his difficulties</a> in getting <a href="http://xdebug.org">XDebug</a> and <a href="http://netbeans.org">Netbeans</a> working together from an OSX machine hitting a Ubuntu server.
</p>
<blockquote>
For the past 18 months working with PHP, i've primarily used alternatives, not out of preference, but because netbeans xdebug integration consistently failed me.  It would (might) work with a remote apache, but would not play with scripts executed remotely from the command line.  I could be fairly sure my xdebug config was sound as I no problems with MacGDB and PHPStorm whatsoever.
</blockquote>
<p>
With a little more investigation, he discovered that it was the OSX firewall causing issues. He found that, with a new incoming connection came a confirmation box to approve the connection. This, of course, wasn't passed along to Netbeans so he never saw it. In the end, he set up a reverse SSH tunnel to bypass the firewall completely (command included).
</p>]]></description>
      <pubDate>Wed, 31 Aug 2011 13:04:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: The best developers hit F5]]></title>
      <guid>http://www.phpdeveloper.org/news/16778</guid>
      <link>http://www.phpdeveloper.org/news/16778</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> <a href="http://www.eschrade.com/page/the-best-developers-hit-f5/">has a suggestion</a> for developers out there - you should hit F5 more often:
</p>
<blockquote>
The best developers hit "Refresh"?  No.  Well, yes, but that's not what I was referring to.  F5 is what you hit in Zend Studio/PDT to "Step Into" during a debug session.  A LOT of developers just look at an API, or code completion, write to it, commit, deploy and they're done.  I have found that the best developers not only build to the API, whatever it is, but also watch the API at work.
</blockquote>
<p>
In his opinion, he's never met "the smartest PHP developer", someone who couldn't learn something from stepping through someone else's code. You don't even need to fully know what's going on to catch helpful bits of code or new ideas you may not have thought of along the way. He also suggests conferences (like <a href="http://www.zendcon.com/">ZendCon</a>) are an excellent place to pick these same things up, just in person.
</p>
<blockquote>
Having been asked what people can do to become better programmers, I would respond by saying that hitting F5 would be pretty high on my list.
</blockquote>]]></description>
      <pubDate>Fri, 26 Aug 2011 10:42:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Debugging two PHP projects in Netbeans at the same time]]></title>
      <guid>http://www.phpdeveloper.org/news/16741</guid>
      <link>http://www.phpdeveloper.org/news/16741</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has posted a <a href="http://robertbasic.com/blog/debugging-two-php-projects-in-netbeans-at-the-same-time/">quick hint for Netbeans users</a> on how they can debug two (interlinked) projects at the same time in the same debugger instance.
</p>
<blockquote>
I'm currently working on some Symfony2 bundles and I have one Netbeans project for the main Symfony2 app and one project for the bundle. [...] The debugger starts for the "main" project, which is the Symfony2 app, but setting breakpoints with Netbeans (y'know, by clicking the line number) for the bundle doesn't really work, as those are in the other project and not in the debugged one, rendering the whole debugging useless. 
</blockquote>
<p>
The fix is pretty simple, if a bit manual - simply place <a href="http://xdebug.org/docs/all_functions#xdebug_break">xdebug_break</a> calls in your code anywhere to tell the debugger to stop there. It's not as friendly and automatic as just clicking in the IDE, but it gets the job done. For more information on Xdebug, see <a href="http://xdebug.org">their site</a>.
</p>]]></description>
      <pubDate>Fri, 19 Aug 2011 08:26:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rafael Dohms' Blog: Debugging PHPUnit Tests in NetBeans with XDebug]]></title>
      <guid>http://www.phpdeveloper.org/news/16353</guid>
      <link>http://www.phpdeveloper.org/news/16353</link>
      <description><![CDATA[<p>
<i>Rafael Dohms</i> has, in a recent post to his blog, shown how to set up NetBeans to <a href="http://blog.rafaeldohms.com.br/2011/05/13/debugging-phpunit-tests-in-netbeans-with-xdebug">use PHPUnit tests with XDebug</a>. This allows him to run his unit test and track down problems with the handy XDebug extension right from his IDE.
</p>
<blockquote>
Every now and then you run into this weird situation in your code, where something that was supposed to zig is now zagging and it makes no sense whatsoever. For me this ends up happening in my unit tests since i'm not running everything in the browser everytime and since my tests usually run more scenarios then a regular browser run, that's where the weird stuff happens.
</blockquote>
<p>
He shows you how to configure NetBeans with the path to your local PHP installation, configure the xdebug settings in your php.ini and how to coordinate the PHPUnit install to send its output to your NetBeans instance. Then it's as simple as clicking "Debug" on the project and running "phpunit-debug" from the command line.
</p>]]></description>
      <pubDate>Wed, 18 May 2011 09:20:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Shiflett's Blog: PHP Session Debugging]]></title>
      <guid>http://www.phpdeveloper.org/news/16107</guid>
      <link>http://www.phpdeveloper.org/news/16107</link>
      <description><![CDATA[<p>
In a new post to his blog today <i>Chris Shiflett</i> takes a look at something a lot of PHP developers take for granted, the language's session handling, and some things you can do to <a href="http://shiflett.org/blog/2011/mar/php-session-debugging">help debug them when things go wrong</a>.
</p>
<blockquote>
For many PHP developers, calling session_start() and using $_SESSION for stuff you want to persist from page to page is all there is to know about sessions. This is understandable, because PHP's native session support is so simple and reliable. But, what if something goes wrong?
</blockquote>
<p>
He points to two <a href="http://shiflett.org/articles/the-truth-about-sessions">older</a> <a href="http://shiflett.org/articles/storing-sessions-in-a-database">articles</a> he's written about some more advanced session handling and includes sample code acting as a walk-through for locating your problem spot. He focuses in on the read() handler method and shows how to debug the data flowing in and out (and some of the information he commonly logs from it).
</p>]]></description>
      <pubDate>Mon, 28 Mar 2011 09:53:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Debugging with Git and PHPUnit]]></title>
      <guid>http://www.phpdeveloper.org/news/16082</guid>
      <link>http://www.phpdeveloper.org/news/16082</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has a recent post about how you can use <a href="http://sebastian-bergmann.de/archives/911-Debugging-with-Git-and-PHPUnit.html">git and PHPUnit to debug</a> your application and find out when the offending code was added.
</p>
<blockquote>
git bisect can be used to find the change that introduced a bug. It does so by performing a binary search on the list of commits between a known good and a known bad state of the repository. A tool such as <a href="http://phpunit.de/">PHPUnit</a> can be invoked at each step of the binary search to check whether or not the current state is broken.
</blockquote>
<p>
He gives an example of some failing tests where the return value isn't equal to what it should be. Finding the hash of the initial commit, he compares that with the "git bisect" command to point to the "good" and "bad" points in the timeline. Command line examples are also included in the post.
</p>]]></description>
      <pubDate>Tue, 22 Mar 2011 13:04:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Debugging Variables]]></title>
      <guid>http://www.phpdeveloper.org/news/15884</guid>
      <link>http://www.phpdeveloper.org/news/15884</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post to his blog today looking at a way you can dig inside of a variable that might be causing you trouble with the <a href="http://derickrethans.nl/debugging-variables.html">help of the debug_zval_dump method</a> - a PHP function that dumps a string representation of an internal zend value directly to the standard output method (usually an "echo").
</p>
<blockquote>
The internal representation of a PHP variable container (called zval), contains the type and value of a variable, but also whether it is a reference and what its refcount is. Due to PHP's copy-on-write policy, one specific zval container can be used by multiple variables at the same time as we will see in a bit.
</blockquote>
<p>
He talks about what the "refcount" field of a variable means and some simple examples showing a single reference, more than one symbols and how PHP handles a "split upon assignment". He also mentions Xdebug's method <a href="http://xdebug.org/docs/all_functions#xdebug_debug_zval">xdebug_debug_zval</a> that takes in a variable name rather than the variable itself.
</p>]]></description>
      <pubDate>Thu, 10 Feb 2011 09:26:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: The Five Tools I Can't Develop Without]]></title>
      <guid>http://www.phpdeveloper.org/news/15874</guid>
      <link>http://www.phpdeveloper.org/news/15874</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> has a new post to his blog today with a list of <a href="http://www.brandonsavage.net/the-five-tools-i-cant-develop-without/">five tools he can't live without</a> in his day-to-day development work. These range from the physical hardware under his fingertips down to software that helps get the job done.
</p>
<blockquote>
Every developer has a toolkit of favorite tools and applications that help them develop more effectively. Being individuals, developers often differ (and in some cases, argue) about the tools they use. One of the most frequent questions I'm asked is "what are the tools you use?" and that was the genesis of this blog post. While there are many tools that I would feel lost without, I have listed the five that I see as most crucial to my ability to effectively develop software.
</blockquote>
<p>
His list includes the physical - a fast machine with dual monitors - and less physical - bug tracking software, an IDE he feels comfortable with and a few Firefox plugins to make debugging simpler. There's <a href="http://www.brandonsavage.net/the-five-tools-i-cant-develop-without/#comments">a few comments</a> on the post from other developers sharing their "must haves" in their development too.
</p>]]></description>
      <pubDate>Tue, 08 Feb 2011 12:52:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Tony Lukasavage's Blog: PHP Debugging on IntelliJ IDEA 10 with Xdebug]]></title>
      <guid>http://www.phpdeveloper.org/news/15696</guid>
      <link>http://www.phpdeveloper.org/news/15696</link>
      <description><![CDATA[<p>
<i>Tony Lukasavage</i> has a new post to his blog about <a href="http://savagelook.com/blog/portfolio/php-debugging-on-intellij-idea-10-with-xdebug">debugging your PHP applications with IntelliJ and XDebug</a> on a WAMP install.
</p>
<blockquote>
If you are a serious PHP developer and have not given debugging a fair chance, or a chance at all, you are killing yourself. So let's do this thing from the ground up. WAMP, XDebug, IntelliJ, and magic. Follow these steps (for Windows) to reach my recent state of elightenment and PHP debugging bliss.
</blockquote>
<p>
It's a sixteen step process, but don't let that scare you off - it's made up of lots of little steps like "make a phpinfo() page" and "download IntelliJ IDEA". The rest is actually setting up a new PHP project, dropping in a breakpoint and mapping the scripts to run on your local machine's WAMP install.
</p>]]></description>
      <pubDate>Thu, 06 Jan 2011 14:24:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Christoph Dorn's Blog: Zend Server + FirePHP on AWS]]></title>
      <guid>http://www.phpdeveloper.org/news/15691</guid>
      <link>http://www.phpdeveloper.org/news/15691</link>
      <description><![CDATA[<p>
<i>Christoph Dorn</i> has <a href="http://www.christophdorn.com/Blog/2011/01/06/zend-server-firephp-on-aws/">a new post</a> today showing how to get the <a href="http://www.firephp.org/">FirePHP</a> tool to work together with Zend Server on an AWS instance to help make your debugging even simpler.
</p>
<blockquote>
<a href="http://www.firephp.org/">FirePHP</a> can nicely complement the built-in tools available when using <a href="http://www.zend.com/en/products/server/">Zend Server</a> and can be easily made available to all provisioned sites. This tutorial illustrates how to setup <a href="http://www.christophdorn.com/OpenSource/#FirePHP">FirePHP 1.0</a> for all virtual hosts on a <a href="http://www.zend.com/en/products/server/amazon/">Zend Server AMI</a> on <a href="http://aws.amazon.com/ec2/">Amazon EC2</a>.
</blockquote>
<p>
He steps you through the process of getting FirePHP installed and working in your browser as well as pulling the "firephp.phar" file in on the Zend Server side. Configuration is pretty simple - the lines for the Apache config are included and the JSON needed to make the credentials for FirePHP are too. A simple test script is created and an auth key is set and you should be up and running.
</p>]]></description>
      <pubDate>Thu, 06 Jan 2011 09:43:01 -0600</pubDate>
    </item>
  </channel>
</rss>

