Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Aptana WRT Plugin - displaying log messages in output console

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Aptana has been superseded by the Nokia Web Tools, an IDE and Simulator based on Aptana and Eclipse. While you may still be able to use Aptana directly (as described in this document), the Nokia Web Tools are easier to install and represent a more optimised and better maintained toolchain for mobile web runtime development.

Article Metadata
Created: jappit (10 Jun 2009)
Last edited: hamishwillee (28 Jun 2012)

This article explains how to display log messages in Aptana Output console, useful for debugging Web Runtime widgets.



This article assumes that:

  • You have installed latest version of Aptana IDE ([1])
  • You have installed latest version of Aptana WRT Plugin ([2])
  • You have Firefox installed on your system ([3])

For basic information about the Aptana WRT Plugin, please check this Nokia Developer Wiki Article: Archived:Aptana WRT Plugin Basics.

How to display log messages

Install the Aptana JavaScript debugger

First step is to install the Aptana JavaScript debugger, as described here: Installing the JavaScript debugger.

Fastest way to install the debugger Extension in FireFox, is through this direct link: Aptana JavaScript debugger Firefox extension

Add aptana.log() to your code

In order to display a log message from your WRT widget, you have to use the following code:

aptana.log("Your log message");

Start the Debug process

In order to use the JavaScript debugger, you have to run your WRT project in Debug mode. So, just right-click the "wrt_preview_frame.html" file and then select Debug as -> JavaScript Web Application.

If you don't know how to create a new Web Runtime project from Aptana, check this article: Archived:Aptana WRT Plugin Basics.

The Aptana Debug perspective should automatically be opened, and the project started inside Firefox. In case this does not happen:

  • to open the Debug perspective, from the Aptana menu go to Window -> Open Perspective -> Debug
  • if Firefox is not opened, right click on "wrt_preview_frame.html" file and then select Debug as -> Debug.... Then, in the "Main" panel, set the Browser executable field to your Firefox executable path. (e.g.: C:\Programmi\Mozilla Firefox\firefox.exe)

See your messages in the Output console

Once the Debug process has started, your messages will be automatically shown in the Aptana Console view. If the Console is not opened, just go, from the Aptana menu, to Window -> Show view -> Console.
Aptana javascript debugger.png

This page was last modified on 28 June 2012, at 23:54.
61 page views in the last 30 days.