Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Regular Visitor
Posts: 1
Registered: ‎03-23-2011
My Device: developer
My Carrier: developer

Debugging WebWorks Application using Eclipse?

I have been working on a WebWorks Application (i.e. a standalone phone app implemented in html and javascript), but I have not been able to get debugging to work on the simulator. These are the steps I follow:


  • I create a new WebWorks project and add a few lines of code and markup (see below).
  • I right-click on frame to the left of the the javascript and select 'toggle breakpoint' on various lines of code. A little blue dot appears on these lines.
  • I highlight the project in the project explorer, click the debug dropdown, select 'Debug As', 'Blackberry Simulator'. The simulator starts.
  • I find my application in the 'downloads' folder and start the application.

The application works just as expected, but I don't break on any of the breakpoints, and I don't see any way to break into the debugger. Should the debugger break on javascript breakpoints? Should I be able to debug javascript on the simulator. Have I missed some important setting?


I see in the Error Log that 'The debug port 10000 is in use. Please select a different port for the debugger.' I don't see any reason port 10000 should be in use. I also don't see any way to change this. Is this the cause of my problem?


Any ideas would be appreciated,





  • Windows XP
  • Eclipse Helios Service Release 2
  • Aptana Studio 2.0.5
  • BlackBerry WebWorks Plug-in 2.5.1
  • BlackBerry Webworks SDK Plug-in 1.5.1
  • Simulator: Storm2 9550 (

Code & Markup:



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no" />
<title>Insert title here</title>
<style type="text/css">
body {
	background-color: #1fd50d;
<script language="JavaScript">
var x = 12;
window.onload = function() {
	setNewVal( 'new stuff');
	document.body.style.height = screen.height + 'px';

function setNewVal( newVal ) {
	var theDiv = document.getElementById( 'testdiv');
	while(theDiv.childNodes.length >= 1) {
	theDiv.appendChild(theDiv.ownerDocument.createTextNode(newVal + x.toString()));

function thiswasclicked() {
	setNewVal( 'this was clicked');
	<div onclick="thiswasclicked();" id="testdiv">old stuff</div>
<p>Hello World</p>