Home > AS/400 Tips > WebSphere Strategies for iSeries professionals > Options for debugging Java applications
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEBSPHERE STRATEGIES FOR ISERIES PROFESSIONALS

Options for debugging Java applications


Jim Mason
01.10.2002
Rating: -3.50- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Debugging applications isn't usually an important consideration when you're deciding on application architectures or requirements. It's one of those items that becomes critical during development if you haven't planned ahead. With Java, iSeries developers usually have a good choice of debugging options. You can select the one that best fits your debug requirements. Debugging Java applications is a LARGE topic. This tip points out your options and some considerations for getting started.

Your options for debugging depend on the following:

Development or deployment debugging requirement?

During the application development cycle I usually choose the VisualAge for Java IDE debugger, which is easy to use and offers complete application control. During deployment testing, I choose either the traditional iSeries command line debugger OR the new IBM Distributed Debugger.

Mapping Java application types to debug options

Welcome to Adobe GoLive 5 [TABLE]

Notes:

Handling optimized Java classes

Debugging Java applications is different than with other types of applications. Java applications are USUALLY more effectively debugged when the Java application is composed of non-optimized class files. For iSeries, you have the option of using the Java transformer to optimize your Java classes which removes most debug information. You can choose to recompile the classes and specify a lower optimization level (00 or 10). For WebSphere Application Server, you choose the debug level for Java classes that are compiled (e.g., JSPs) by WebSph


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Web Tools
Programming for the Web on the IBM i, what is possible
Zend Web software teams up with IBM System i
Using geocoding on AS/400 to enhance your Web presence
The iSeries Blog has a new home on IT Knowledge Exchange
The best technologies and tools for System i programmers in 2009
Search400.com Products of the Year 2008
Application modernization strategies for System i
Natively supported Web applications for Power running i
System i PHP authoring tool tries to fill void in Web-coding know-how
Lazy coder: What does PHP on the i5 mean?

Web Servers
System i no longer the stepchild of IBM's world
Connecting WebSphere to AS/400 for image retrieval
Weaving in WebSphere
SOA enhancements drive IBM WebSphere feature packs
SOA means money for IT workers
Enable J2EE app on WAS to access DB2
Securing Apache: Keeping patches current
IBM runs USOpen.org on Power boxes
MoMA's IT makeover a mix of old and new
How does RPG talk to a browser?

WebSphere Strategies for iSeries professionals
Application modernization strategies for System i
Application modernization in the i world
Natively supported Web applications for Power running i
Enterprise open source basics
Basic security considerations for a Domino/WebSphere system
Simplifying data access using Java Standard Tag Library
Integrating Microsoft ActiveX components with WebSphere
Choices for running Web workloads on iSeries
Virtual hosting for iSeries Web applications
Automate WebSphere configuration backups on the iSeries (i5)

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


ere at the application server level. You can set the debug level as an option during configuration on a specific application server instance.

iSeries standard debug support

This debugger is invoked from the 5250 command line. It allows setting breakpoints, stepping through an application and inspecting values in an application. It can be used to debug WebSphere classes and can use the STRSRVJOB capability from another job.

The iSeries debugger doesn't need to be installed, since it is a part of the platform for a given OS/400 version.

IBM VisualAge for Java integrated debugger

This debugger adds support for changing code dynamically and visually tracing JSP source execution. It is great during development.

The VisualAge debugger is automatically included with VisualAge in the IDE and doesn't require any setup (nice).

IBM Distributed Debugger

With the distributed debugger you also have the option to do the following:

To attach to an application on another system, a debug daemon has to be running on the server.

Configuring the debugger is NOT a simple task for a new developer. Don't get too frustrated.

The IBM Distributed Debugger is now included with all new releases of IBM Java development tools. It is an optional component that you have to separately install and configure.

What debug features do you need?

The features available depend on the debug tool you use. All the debuggers support step execution of Java code, setting variable watches to see values of variables. The Distributed Debugger also has built-in tracing support with graphical output that can be helpful.

The VisualAge debugger is integrated with the editor so you can change your code DURING debug and have the changes saved. That's a very productive feature during development.

The VisualAge debugger offers a JSP execution monitor that shows your JSP source running side by side with the generated Java servlet code. It's hard to debug generated WebShere servlets when the source is somewhat cryptic. This makes it easy to debug your JSPs.

Debugger recommendations

Which is the easiest environment to debug with?
In my opinion, hands down it is the VisualAge for Java integrated debugger. It even works for servlets and JSPs when you run them in the WebSphere Test Environment.

Where possible, use the VisualAge debugger for development with VisualAge, WebSphere Studio or other IDEs. (You can import your Java code into VisualAge.)

Which is the best to debugger for applications running on the iSeries?
It depends on your skill sets. If you're an iSeries developer, running the existing iSeries debugger on Java classes makes sense. It's not too hard to do. If you're a Java developer with no real iSeries skills, try the Distributed Debugger. You may need some help with iSeries configuration parameters, but it should be easier to get started here.

What's the future of debugging Java applications?
For IBM, the Distributed Debugger will probably be the tool of choice. VisualAge will evolve into the new WebSphere Studio Application Developer over time, and its debugger will be changed in the new tool. The iSeries debugger is limited to the iSeries and can't work with remote applications such as the Distributed Debugger. Again, for developers new to the iSeries, the Distributed Debugger is probably a better investment. For experienced iSeries developers, the existing debug tool should be faster to use even though it is "green screen."

--------------------------
About the author: Jim is president of ebt-now.com, an IBM and Lotus business partner focused on delivering e-business application solutions for iSeries 400 customers. Jim writes, consults, teaches, designs and develops iSeries Web applications using Java, WebSphere, DB2, Lotus Domino and the WebSphere Development Tools for the iSeries.

=======================
MORE INFORMATION
=======================


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts