Before you start
About this tutorial
This tutorial describes how to debug your iphone Web application using Eclipse, the Aptana iphone development plug-in, the Aptana Firefox JavaScript debugger, and Firebug.
Goal
Use the various tools provided by Aptana Studio based on Eclipse to debug WEB applications optimized for the IPhone. This tutorial focuses on how best to debug JavaScript and Ajax applications.
Prerequisite
Readers should be familiar with IPhone WEB application development, JavaScript, and Ajax. If you have just contacted iphone Web application development, read Adam Houghton's tutorial, "using Eclipse to develop an iphone Web application."
System Requirements
To learn the example of this tutorial, you need to use Aptana Studio and any of the following operating systems supported by Eclipse: Mac OS X, microsoft®windows®, or linux®. The Java™ Runtime Environment (JRE) is also required and is recommended for use with the JRE for Java V5.
Aptana Studio
The Aptana Studio integrated Development Environment (IDE) is an open source development environment based on Eclipse, designed to build WEB applications, focusing on HTML, cascading style sheets (CSS), and JavaScript. Aptana Studio includes an iphone development plug-in that provides Web developers with a set of tools to help develop Web applications optimized for the iphone.
This tutorial explains how to start debugging with Aptana Studio and discuss how to debug and record using the debugger features of Aptana Studio. Aptana Studio also provides integration with the Firefox Firebug extension, integrating detection and debugging capabilities.
The sample code in this tutorial is the demo application that came with the Aptana Studio IDE to show how the Aptana studio IDE facilitates the debugging process.
The test and debugging tasks for WEB applications are difficult to do in the native mode of the IPhone. Aptana Studio provides a localized WEB development server that can be used for testing. This tutorial describes how to configure Aptana Studio and wireless networks to locally access and test your IPhone Web application on a localized WEB development server.
Get and install Aptana
Aptana Studio offers free community and paid professional editions, which include more support. Aptana website will be a professional version of the Community version + Professional version of the plug-in + support. Luckily, the budget-strapped developer can choose the Community version, which fully supports the IPhone WEB application.
Aptana Studio provides the following features for IPhone Web development.
Preview iphone projects with horizontal and vertical iphone display technology
Wizard files help you start a project quickly
The ability to easily import Ajax libraries into IPhone projects
Local Web server supports running Web applications on IPhone via local WiFi network
Integrates Firebug to achieve logging and command execution.
System Requirements for Aptana Studio:
The operating systems that support Aptana Studio are Windows, Mac OS X, and Linux.
Under Windows, you need a RAM MB and intel®pentium®4 or more processors.
Under Mac OS X, you need the RAM MB and G5 or Intel processors.
Under Linux, you will need to have 4 or more processors in MB RAM and Pentium.
You need to install the Java JRE V1.5.0 or later.
After downloading and installing Aptana Studio, you can install the IPhone plugin, which is not installed by default. Start Aptana Studio. As shown in Figure 1, the Aptana Start Page is displayed in the main file panel. Scroll down the Plug-ins section to find the Aptana iPhone Development Plug-in.
Figure 1. Aptana Studio startup page