This topic is locked

Aptana Studio IDE

11/27/2011 6:06:09 PM
PHPRunner Tips and Tricks
E
electromotive author

Aptana Studio is an open source IDE for HTML, CSS, javascript and PHP editing and debugging to some extent. You could use this if you are extensively modifying or customizing your PHRR generated code, an advanced topic.
To set Aptana up on a Window development box, I'm going to assume you are using the XAMPP web server for development and local testing of your PHPRunner project. If not I'm sure you can adapt the procedure accordingly. I use FireFox as my default browser, and get some debugging ability with the plugins available, such as Firebug. If you have a working local php server, then this will take less than 15 min.

  1. Make sure your PHPRunner and XAMPP environments are setup and working properly. If you are newly installing XAMPP, that's a separate topic, outside the scope of this post. Once XAMPP is fully configured check your XAMPP status is free of errors and shows mySQL, PHP, etc are all good. You should be able to access your project via FireFox or IE on localhost. If you are having trouble here, don't go down the Aptana track.
  2. Download Aptana Studio 3, via this link. Aptana does a lot more than we need, all we need is the PHP support.

    Aptana Download

    Select the standalone version, start the download (at the time of this post the link was:

    http://download.aptana.com/studio3/standalone/3.0.6/win/Aptana_Studio_3_Setup_3.0.6.exe)

    This is a 135MB file.
  3. Launch the exe. Step through the installation, the defaults are ok I think. Takes about a minute.
  4. Start Aptana Studio. It may ask for GIT. Use PortableGit. (takes another minute or two)
  5. Next you have to create an Aptana project using your existing PHPR project.

    File>Import>General>Existing Folder as New Project. Next.

    Browse for folder > Computer>LocalDisk>xampp>htdocs>myproject (or wherever). Ok

    Select Project Type > PHP and Web-Primary. Finish
  6. Your project code tree should appear in the Project Explorer. Right click on your project and select properties. Select PHP Development and ensure that PHP 5.3x (or whatever you are using). Next you need to connect in XAMPP so you can run your code. Select Preview Settings > Use Specific Server. New. Simple Web Server. Ok. Enter any name like ExternalWebServer, enter the url you use for local testing to start your PHPRunner project, such as http://localhost/myproject, set (browse to) the document root, ie., C:/xampp/htdocs/myproject. Ok, Apply. Ok
  7. Again in Project Explorer, right click your project and select Run As > Run Configuration. The Main > Web Browser should be good (FireFox or IE.exe), but in Server > Use selected server > select from the dropdown the server name you assigned in step 6 (ie ExternalWebServer). Run
  8. Your project should now run within your browser (whenever you run).

    Find index.htm and double click. It will open in the editor window.
    Be aware that Aptana creates a configuration folder (.settings) in your project. This won't interfere with PHPR, but you don't want to inadvertently send it up to your production server.
    The main benefit is the beautiful context sensitive editor, code error/problem detection, etc.

    But this post is not going to talk about how to use Aptana to debug/modify your code <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=18421&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' /> Maybe some other kind soul will offer an example how to debug a bit of custom javascript using this IDE.
    Aptana Help