ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/stepping.htm

84 lines
6.0 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Step through Java programs to debug" />
<meta name="abstract" content="You can step through your program while debugging. You can either step over or step into other functions. Java programs and native methods can use the step function." />
<meta name="description" content="You can step through your program while debugging. You can either step over or step into other functions. Java programs and native methods can use the step function." />
<meta name="DC.Relation" scheme="URI" content="debugpro.htm" />
<meta name="DC.Relation" scheme="URI" content="evalvar.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="stepping" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Step through Java programs to debug</title>
</head>
<body id="stepping"><a name="stepping"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Step through Java programs to debug</h1>
<div><p>You can step through your program while debugging. You can either
step over or step into other functions. Java™ programs and native methods can use
the step function.</p>
<p>When the program source first displays, you can start stepping. The program
stops before running the first statement. Press F10 (Step). Continue to press
F10 (Step) to step through the program. Press F22 (Step into) to step into
any function that your program calls. You can also start stepping anytime
a breakpoint is hit. For information about setting breakpoints, see <a href="setbreak.htm">Set breakpoints</a>.</p>
<pre>+--------------------------------------------------------------------------------+
| Display Module Source |
| |
|Current thread: 00000019 Stopped thread: 00000019 |
|Class file name: Hellod |
|35 public static void main(String[] args) |
|36 { |
|37 int i,j,h,B[],D[][]; |
|38 Hellod A=new Hellod(); |
|39 A.myHellod = A; |
|40 Hellod C[]; |
|41 C = new Hellod[5]; |
|42 for (int counter=0; counter&lt;2; counter++) { |
|43 C[counter] = new Hellod(); |
|44 C[counter].myHellod = C[counter]; |
|45 } |
|46 C[2] = A; |
|47 C[0].myString = null; |
|48 C[0].myHellod = null; |
|49 A.method1(); |
|Debug . . . |
| |
|F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable |
|F12=Resume F17=Watch variable F18=Work with watch F24=More key |
|Step completed at line 42 in thread 00000019 |
+--------------------------------------------------------------------------------+</pre>
<p>To stop stepping and continue running the program, press F12 (Resume).</p>
<p>For more information about stepping, see <a href="../books/sc092712.pdf" target="_blank">WebSphere<sup>®</sup> Development Studio: ILE C/C++ Programmer's
Guide, SC09-2712</a> <img src="wbpdf.gif" alt="Link to PDF." /> and
online help information.</p>
<p>For information about evaluating variables when a program stops running
at a step, see <a href="evalvar.htm">Evaluate variables in Java programs</a>.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="evalvar.htm">Evaluate variables in Java programs</a></strong><br />
There are two ways to evaluate a variable when a program stops running at a breakpoint or step.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="debugpro.htm" title="The easiest way to debug Java programs that run on your iSeries server is to use the IBM iSeries System Debugger. IBM iSeries System Debugger provides a graphical user interface that enables you to more easily use the debugging capabilities of your iSeries server.">Debug a Java program</a></div>
</div>
</div>
</body>
</html>