IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Java technology  >  

Debug Tracer

An XML-driven debugging automation tool for Java.


Date Posted: January 29, 2004
OverviewRequirements Download FAQs Forum Reviews

What is Debug Tracer?

Debug Tracer is an XML-based scripting tool for debugging, tracing, and monitoring the JavaTM Virtual Machine (JVM). It is useful for debugging problems quickly, almost "real-time," when a number of problems manifest themselves. The tool does not require any modification to code and can be used to monitor not only the application, but any code in the JVM, including JVM itself.

Debug Tracer provides many features such as conditional debugging, logging of JVM events, etc. The debug scripts can be reused during different phases of the life-cycle of the product. For example, they can be used during regression testing: After a script is written to isolate a coding problem the "first time," it can then be used as one enhances the code to verify that one has not introduced a problem with subsequent changes. Because the tool does not require user intervention after it is starts and attaches itself to the JVM (which it can do any time during the running of the application), and because it does not have a user interface to control debugging, it can be used to debug situations in which conventional debuggers cannot be used.

The lack of need for user intervention does not mean less control over debugging. The tool provides a rich set of conditions and associated scripting for automating control. In fact, these features provide many capabilities that typical conventional debuggers do not possess.

Debug Tracer solves the following business problems:

  • The tool is useful for troubleshooting and debugging applications running in a JVM when human intervention is not possible.
  • It is useful for debugging timing and random problems, where conventional debugging techniques fail.
  • Scripts can be reused during the life cycle of the product. Debugged problems can be retested anytime: during regression, testing, development, etc.

Debug Tracer is packaged in a zip file that contains the following:

  • a README.txt file that describes the tool in detail, including the scripting language
  • an examples directory with subdirectories containing examples and associated README.txt files
  • the tool itself in a JAR file.

How does it work?

Debug Tracer works with Java 2 and above.

The JVM provides built-in capabilities for debugging. Before start-up, the JVM can be put in debugging mode using a set of options passed to the JVM. This mode allows the JVM to communicate with a debugging client running in another process. The protocol for communication between the client and the JVM is given by the Java Platform Debugger Architecture (JPDA).

JPDA also provides a set of debugging APIs, called Java Debug Interface (JDI), for creating debugging clients. The API library is in "tools.jar" in any Java 2 and above Java Development Kit (JDK). The debugging paradigm is based on "events" in the JVM. Clients can register for notification of specific events occurring in the JVM. For instance, a client could ask to be notified when a specific exception occurs or when methods in a class are invoked on an instance of the class.

Debug Tracer is written using JDI. It adds value to the JDI API by providing conditional execution, language features such as expressions, and logging facilities. Together, these let the user debug without any intervention, allowing for near-real-time debugging with fast turnaround.


About the technology author(s):
Srinivasan Muralidharan is an Advisory Engineer. He has spent ten years on object-oriented development work in diverse areas of software such as Web content management systems, host integration, Common Platform C++ Framework, handheld development, and embedded systems (on pSOS). Mr. Muralindharan's interests are in performance and scalability of Web applications, object-oriented practices, on-demand computing, and Web services. He currently works in the area of WebSphere host integration.

John R. Hind is a Senior Programmer and Master Inventor at IBM SWG System House. After graduating from VPI&SU with a masters in CSA (EE), he worked in the fields of laboratory automation and intelligence distributed computing. In 1977, Mr. Hind joined IBM to work on the communications subsystem of DPPX. Over the years, in various positions at IBM, he has had the opportunity to contribute to a number of emerging technologies, including distributed transaction processing, email, relational database, directories, security, privacy, Java, graphics and multimedia, pervasive computing, home networks, connectivity, quality of service, and WEB technologies including XML. In his current position, Mr. Hind's main focus is on technologies that help provide customers with easy-to-use, serviceable solutions.

Download now Download now

Related technologies

For platform(s):
Java

For topics:
debugging, tracing, automation, monitoring, JVM


 

    About IBM Privacy Contact