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

86 lines
5.8 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="task" />
<meta name="DC.Title" content="Set breakpoints" />
<meta name="abstract" content="The running of a program can be controlled with breakpoints. Breakpoints stop a running program at a specific statement." />
<meta name="description" content="The running of a program can be controlled with breakpoints. Breakpoints stop a running program at a specific statement." />
<meta name="DC.Relation" scheme="URI" content="debugpro.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="setbreak" />
<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>Set breakpoints</title>
</head>
<body id="setbreak"><a name="setbreak"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Set breakpoints</h1>
<div><p>The running of a program can be controlled with breakpoints. Breakpoints
stop a running program at a specific statement.</p>
<div class="section"><p>To set breakpoints, perform the following steps:</p>
</div>
<ol><li><span>Place the cursor on the line of code where you would like to set
a breakpoint.</span></li>
<li><span>Press F6 (Add/Clear breakpoint) to set the breakpoint.</span></li>
<li><span>Press F12 (Resume) to run the program.</span></li>
</ol>
<div class="section"><div class="note"><span class="notetitle">Note:</span> Just before the line of code runs, where the breakpoint is set,
the program source is displayed indicating that the breakpoint was hit.</div>
<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 |
|Breakpoint added to line 41. |
+--------------------------------------------------------------------------------+</pre>
<p>When you hit a breakpoint, if you want to set breakpoints that
are only hit within the current thread, use the TBREAK command.</p>
<p>For
more information about system debugger commands, 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 breakpoint, see <a href="evalvar.htm">Evaluate
variables in Java™ programs</a>.</p>
</div>
</div>
<div>
<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>