Remote Project and using PHP Debugger in GoDaddy and other shared hosting
Remote Projects – finally. New in PhpED 16.0
Whenever we did previous reviews (https://www.php-editors.com/review/php_editor_sql_profiler.php, https://www.php-editors.com/review/nusphere.php, http://php-editors.com/articles/symfony-php-editor.php etc.) of NuSphere flagman PHP IDE we ran a real Web Site development project using PhpED. We found their PHP Editor to be swift and very user friendly, php debugger powerful and code intellisense superb – we love the product and make no secret of it. However, for a long time the users of PhpED like us complained about the requirement to have a local copy of an entire project on the hard disk. For many individual developers running multiple projects for various customers it is simply impractical and for the development teams it is also an obstacle to the productivity. This is why we got extremely excited when we read about PhpED 16.0 release with a full support for Remote Projects and jumped right on.
User experience with Remote Projects
Just like their website promised setting up Remote Projects is indeed easy – all you really need to have is an SFTP or FTP account on a remote server, which you most likely have to have anyway to deploy your scripts. Using PhpED Tools->Accounts we quickly set it up:
After that we select Project and follow instructions of Project Wizard (note, that you can run Project Wizard with existing project to modify Project properties as well: Launch Project Properties by selecting Properties menu item from right mouse button popup menu on selected project, then select button Settings Wizard at the bottom of the dialog). Follow the instructions
And make sure to select your SFTP (or FTP or any other file transfer account) as a Root Directory of the project:
One of the next pages of the Wizard will prompt you to install dbg-wizard.php script to your remote site to help setting up the debugger.
It is a very good idea to set it up because PHP Debugger is probably the most important feature that makes PhpED worth the money. You should let the wizard install the script and run the diagnostic.
Dbg Wizard will help you setup debugger and the rest of the remote project
However there are a couple of manual steps you need to do because of the limitations of shared hosting
Getting things to work in GoDaddy or similar shared hosting environment
So, soon enough you will run into the issues of dealing with GoDaddy or similar shared hosting provider.
- You won’t have access to php5.ini to edit it with the information about the debugger extension
- Default port on which php debugger is listening for requests won’t be open by GoDaddy
Luckily there is a solution and a simple one too – we provided it in one of our Tutorials on debugging of PHP applications . If you follow the steps described in the tutorial you’ll have Php Debugger install and ready to roll.
The files in Remote project look the same as in local as do all other tools and tabs of the Editor
Saving files looks like saving files locally, however behind the scenes IDE is doing a secure transfer of the file over SFTP – observant user will notice little file transfer arrows being active at the bottom of the editor.
Debugging also feels like and works just like debugging of a local project. We noticed some slowness in the beginning of debugging session which went away later, most likely there is an initial loading of files happening into the editor.
Same functionality in PHP Debugger is available for both local and remote projects
Including stepping through the code, displaying and modifying local variables, immediate execution tab, call stack etc.
The beauty of remote projects is that you can edit a file to fix a bug right away with the same speed of the Editor – even though the files are stored on a remote server, IDE loads them locally for editing and handles transfers with the server behind the scene.
However, it should be noted that while debugging site live is fine – dbg debugger used by NuSphere will only get invoked on a request from specific IP – editing scripts live is hardly a good practice. Source control and development version of a web site are certainly good practice and there is a support for an integration of Tortoise GIT and SVN in PhpED, however native built client would be a much better feature.
In Summary - Remote Projects are a winner. This features lets the user hookup PhpED to any web applications, including the ones served using shared hosting plans like GoDaddy, edit and debug files in the editor w/o having to store them on a local disk.
Free trial of NuSphere PhpED is available here.
For more information of PhpED you can visit http://www.nusphere.com