
JavaArt Chapter 3. Tracing with JPDA

From the website:

  Killer Game Programming in Java
  http://fivedots.coe.psu.ac.th/~ad/jg

  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th


If you use this code, please mention my name, and include a link
to the website.

Thanks,
  Andrew

============================

The tracer application consists of 5 Java files:

  * SimpleTrace.java, StreamRedirecter.java, JDIEventMonitor.java
    ShowCode.java, ShowLines.java


There are 2 test applications for the tracer:

  * Comparison.java
  * TestStack.java and Stack.java
       - TestStack uses Stack


There are 2 batch files:

  * compile.bat
  * runTrace.bat
     - they both assume that tools.jar is in
           c:\Program Files\Java\jdk1.6.0_10\lib\


----------------------------
Compilation of the tracer:

  > compile *.java

Note: the compilation of the test applications can use javac:

  > javac Comparison.java
  > javac TestStack.java
  > javac Stack.java


----------------------------
Execution of the tracer:

  > runTrace <java-file-to-be-traced>
e.g.
  > runTrace Comparison
  > runTrace TestStack


Note: you can also run the test applications directly:

  > java Comparison
  > java TestStack

---------
Last updated: 30th March 2009
