OverviewShindig is a new project in the Apache Software Foundation incubator and is an open source implementation of the OpenSocial specification and gadgets specification. Details of Shindig can be found at http://incubator.apache.org/shindig/ Shindig is currently available in Java and PHP. The following article explains how to setup a debug environment for the PHP version of Shindig on your windows machine. Setting up a debug environmentAs one starts serious development with shindig, a development environment becomes indispensable. In my previous articIe, I wrote about using PHPEd as an IDE for debugging Shindig PHP codebase. However,PhpEd is a commercial IDE. For those who want to use an open-source alternative, I have listed how to setup debugging using xdebugclient, an open source project available at http://code.google.com/p/xdebugclient/.
Setting up remote debuggingFirst, we need to setup remote debugging on Apache. To enable this, one has to do the following steps:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php [L] </IfModule>
4. Open a web browser and navigate to http://localhost/shindig/php/dbg-wizard.php. If everything goes well, you should see a page like this:
Configure XDebug Client for debugging
Start Xdebug client application. Now start the debug listener from the Debug Menu. Now open a browser and navigate to the URL you want to debug. Remember to add XDEBUG_SESSION_START=1 to the end of the url. For example, http://localhost:8000/shindig/php/social/rest/people/john.doe/@self?st=a:a:a:a:a:a&XDEBUG_SESSION_START=2 Will start the debugging of Shindig PHP's REST API. The following screen shows the project being debugged. |

