Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Analyze your applications visually

Using Visual Trace within WebSphere Studio to extend runtime analysis

AnnMarie Stenglein, Testing Specialist, IBM
AnnMarie Stenglein is currently a Testing Specialist in the Automated Software Quality Technical Marketing Group, working with the developer tools IBM Rational PurifyPlus (IBM Rational Purify, IBM Rational Quantify and IBM Rational PureCoverage). She has worked in the Technical Marketing group since April 2004. Previously, she worked as a Field Technical Representative for Rational for three years and IBM for one year, supporting Rational tools in the areas of testing, change management, requirements management, software configuration management, and design.

Summary:  In this tutorial, you will learn how to use IBM Rational Visual Trace to perform runtime analysis of applications by capturing a trace of the application and displaying it through a trace sequence diagram. IBM Rational Visual Trace can help you understand the code underlying your application by providing a visual model of how the application runs. It can also help you debug code and generate sequence diagrams from your trace sequence diagram.

Date:  10 Nov 2004
Level:  Introductory PDF:  A4 and Letter (28 KB | 8 pages)Get Adobe® Reader®

Activity:  6821 views
Comments:  

Before you start

About this tutorial

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.


Should I take this tutorial?

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.


Prerequisites

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!"

1 of 5 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=134526
TutorialTitle=Analyze your applications visually
publish-date=11102004
author1-email=
author1-email-cc=