Before you start
This tutorial describes how to use IBM Rational Visual Trace (part of IBM Rational PurifyPlus V2003.06.12) to perform runtime analysis. To understand this tutorial, you should know how to run an application from within IBM WebSphere Studio Application Developer (WebSphere Studio) Version 5.1.1 and have some understanding of sequence diagrams.
IBM Rational Visual Trace is a feature used to perform runtime analysis of applications by capturing a trace of the application to a trace sequence diagram. The resulting diagram displays the flow of the application visually and provides information on thread status, code coverage, and memory allocation.
IBM Rational Visual Trace helps you to:
- Understand your code by providing you with a visual model of how an application runs. If your code is generated from a model, it might be easier to determine exactly how the application works by examining a model rather than the code.
- Debug your code by providing you with a comprehensive record of the application's interactions during a run. You can trace the entire application or just a portion of the application.
- Generate sequence diagrams from your code. Once a sequence diagram is generated, WebSphere Studio can be used to print, document, and report functions on the generated diagram.
To help you understand the big picture, IBM Rational Visual Trace relies on Java Virtual Machine Profiler Interface (JVMPI) technology to gather information from a running application. Some Java runtime environments disable JVMPI when in debug mode, which effectively disables Visual Trace. Visual Trace uses a timer to detect this. If the timer expires without acknowledgement from the launched application, a warning is given and the trace sequence diagram will not appear.
Because a timer is used to detect this situation, it is also possible that a time-consuming application launch might cause the timer to expire before the application is loaded. In this case, you receive a warning even though Visual Trace can be started. If this warning is received and the application has not launched, allow time for the application to launch. If Visual Trace starts, this warning can safely be ignored.
To find a list of supported runtime environments, search the WebSphere Studio online Help. Simply click Help > Help Contents and search on Visual Trace. Supported Runtime Environments is one of the results.
This tutorial is directed primarily to software architects, developers, and testers, but would be helpful for anyone who wants to understand their code better and see it displayed in an easily readable visual format. It would also be useful for anyone who would like to debug their code in a user-friendly visual format.
To complete the steps in this tutorial, install the following software:
- IBM Rational PurifyPlus
- IBM WebSphere Studio Application Developer. For information on installing the software and getting started, see the release notes.
- Download the EmployeesWeb_example.zip containing the sample source code used in this tutorial. The application that is being used in the screen shots is a simple Web browser that allows you to retrieve a list of your current employees (first name, last name, and employee ID), and add to the list when you hire new employees. When you are finished adding a new employee, the application will return a window that states, "Hire Away!"