Exforsys.com
 
Home Tutorials WebSphere
 

WebSphere V5.0 : Debugging - Step-through code

 

WebSphere V5.0 : Debugging - Step-through code

In this tutorial you will learn about WebSphere V5.0 : Debugging - Stepping through the execution of a Java program, Step over, Step into, Run to return and Run to line.



Stepping through the execution of a Java program

When a thread is suspended, the step controls can be used to step through the execution of the program line-by-line. While performing a step operation, if a breakpoint is encountered, execution suspends at the breakpoint, and the step operation ends.


Step over

1. Select a stack frame in the Debug view. The current line of execution in that stack frame is highlighted in the editor in the Debug perspective.

2. Click the Step Over button in the Debug view toolbar, or press the F6 key. The currently-selected line is executed and suspends on the next executable line.

Step over


Step into

1. Select a stack frame in the Debug view. The current line of execution in that stack frame is highlighted in the editor in the Debug perspective.

2. Click the Step Into button in the Debug view toolbar, or press the F5 key. The next expression on the currently-selected line to be executed is invoked, and execution suspends at the next executable line in the method that is invoked.


Step into


Run to return

1. Select a stack frame in the Debug view. The current line of execution in that stack frame is highlighted in the editor in the Debug perspective.

2. Click the Run to Return button in the Debug view toolbar, or press the F7 key. Execution resumes until the next return statement in the current method is executed, and execution suspends on the next executable line.


Run to Return


Run to line

When a thread is suspended, it is possible to resume execution until a specified line is executed. This is a convenient way to suspend execution at a line without setting a breakpoint.




1. Place your cursor on the line at which you want the program to run and select Run to Line from the pop-up menu or use Ctrl + R. Program execution is resumed and suspends just before the specified line is to be executed.

2. It is possible that the line will never be hit and that the program will not suspend. Breakpoints and exceptions cause a thread to suspend before reaching the specified line.


Run to line


_________________


Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.



Read Next: WebSphere V5.0 : Debugging - View variables



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape