Tutorial:Debugging an Application Running on BUG Y.T

From BUGwiki

Jump to: navigation, search

Contents

Overview

This page describes how to enable the remote debugging of Java programs with BUG 2.0 software.

BUG Setup

Shutdown non-debug JVM

From an SSH console logged into the BUG, type:

/etc/init.d/felix stop

Now start the debug-enabled JVM with:

/etc/init.d/felix-debug start

You should see a message saying that the JVM is waiting for a connection.

Host Setup

Your host should have Eclipse Helios installed with the Dragonfly SDK. To remote debug an an application, have the application source code in the Eclipse workspace and set a breakpoint in Activator.start().

In Eclipse, from the Run menu, select "Debug Configurations...". A launch dialog will appear. Create a new entry under "Remote Java Applications". Set the host to be the IP address of the BUG and the port to 5000. Click the debug button.

After a few moments the breakpoint in your application should be tripped, and now you can step through your code remotely!

Troubleshooting

If the breakpoint is never reached, confirm in the logs on BUG that the application was started. If you don't get past the "waiting for connection" message, check your network settings. Contact us at #buglabs@irc.freenode.net or our forums at http://bugcommunity.com.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Print/export