PHPEdit.net Community
   
1 2 3 4
Tutorials Tips Pasties Code Snippets
 

Home > Tips

Tips

How to speed up debugging sessions?

Usually when a debug session execute really slowly it's related to the fact that the IDE is displaying several notice or strict messages. You can switch this behavior off to speed up the debug session in the preference dialog.

Using Actions to Increase Productivity

Actions make PHPEdit extremely customizable. You can create actions that are calling PHPEdit commands. You ever think of when you want to save a file and have code beautifier cycle through it, upload it through FTP or commit it to subversion/svn?

Actions make this possible. If you are finding yourself doing operations consistently that could be automated in some aspect Actions are for you.

To get started, you need to know a little about the PHPEdit commands. Navigate to Tools -> Script Command Editor. Here you can right click and create a custom script that later you can add as an action.

My script looks like this:
CodeBeautifierExecute
FileSave
FTPPublishActiveDocument

What this does is allow me to execute code beautifier, save the file and bring up the dialog to publish to FTP.

The next step is to go to Tools -> Edit Preferences. Navigate to Graphical user interface -> Actions. Click New Action. Add your script into the Script section. Give it a caption and category. Then bind it to a shortcut (I gave this one Ctrl + Alt + P). You can also give it certain Contexts to run in by setting specific types of documents to run on, etc.

I hope this quick tip gave you ideas for creating your own actions that produce more efficient productivity!

Handling special file extension

If your projects use special file extension for PHP documents (.module for example) you will need to explain PHPEdit this to be able to debug.

Open the preference dialog (F10) and in the Language -> PHP section, you can add your extensions there (ie. "module" for example) after the existing list.

PHPEdit Debugging Browser integration

The Firefox Xdebug Toolbar of PHPEdit helps you to debug your scripts on your server. You can easily turn on debugging or profiling for each request, or just for some special ones.

The toolbar is able to exchange important data between an opened PHPEdit instance and the toolbar. You can for example define which errors should be displayed, or if xDebug should pause the execution of the script on the startup.

http://doc.waterproof.fr/phpedit/debugging_profiling/browser_integration

Adding Zend Framework support

PHPEdit supports almost all framework within Code Hint and Code Insight. You simply need to configure PHPEdit the right way.

To add support for Zend Framework:

1. Display the preference dialog (F10)
2. In Language -> PHP -> File dependencies, in the Include Path part, add the path to your ZF location, check the recursive checkbox, click on "Parse for cache", then Add.

You should now have all code hint and code completion for the framework.

http://www.waterproof.fr/blog/index.php?/archives/29-Adding-Zend-Framework-support.html

PHPEdit mobile using an USB stick

PHPEdit can be installed directly on a USB stick, but the problem is that PHPEdit's settings are stored in the user's profile directory. So to have these settings put in the USB stick, you have to tell PHPEdit what directory to use.

Read the FAQ entry here: http://doc.waterproof.fr/faq/phpedit/how_do_i_install_phpedit_on_a_usb_stick_phpedit_2_10_and_up

Advanced Cut

If you press Ctrl+X without any selection, PHPEdit will first select the word near your caret and the cut it to the clipboard.

Duplicate current line

You can duplicate current line using Ctrl+D

Advanced Paste

To replace word where your caret is without selecting it first, you can use Ctrl+B instead of the classical usage of the mouse to select the part to replace and paste action.

Advanced Copy

If you press Ctrl+C without any selection, PHPEdit will first select the word near your caret and the copy it to the clipboard.

Got one? Create it now.

View the most popular tips.

Subscribe to comments Want to be up-to-date? Subscribe to tips in your favorite feed reader.

 
PHPEdit User Community, © 2008 WaterProof SARL
Powered by PHPEdit