lejos.nxt.debug
Class DebugMonitor

java.lang.Object
  extended by lejos.nxt.debug.DebugMonitor
Direct Known Subclasses:
RConsole.Monitor

public class DebugMonitor
extends Object

Simple debug monitor that can be run alongside and nxj program. This class catches un-handled exceptions and user interrupts (accept + escape key), it displays information about the event (stack trace etc.). The user is then able to either perform a soft reset (Escape), a hard reset (Escape + Accept), or continue running the program (any other key). All output is directed via System.err.

Author:
andy

Field Summary
protected  DebugInterface monitor
           
 
Constructor Summary
DebugMonitor()
           
 
Method Summary
protected  void displayException(DebugInterface info)
          Display information about the uncaught exception on System.err
protected  void displayThreads(DebugInterface info)
          Dump information about all of the active threads to System.err.
protected  void exit()
           
static void main(String[] args)
           
protected  void monitorEvents()
           
protected  void processEvent(int event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

monitor

protected DebugInterface monitor
Constructor Detail

DebugMonitor

public DebugMonitor()
Method Detail

displayException

protected void displayException(DebugInterface info)
Display information about the uncaught exception on System.err

Parameters:
info - the current VM event

displayThreads

protected void displayThreads(DebugInterface info)
Dump information about all of the active threads to System.err. The threads are dumped in reverse order (low priority first), so that if there are more then eight threads the most important 8 will still be on the LCD display!

Parameters:
info -

exit

protected void exit()

processEvent

protected void processEvent(int event)

monitorEvents

protected void monitorEvents()

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception