<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Netbeans%2FC2%2FNetbeans-Debugger%2FEnglish</id>
		<title>Netbeans/C2/Netbeans-Debugger/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Netbeans%2FC2%2FNetbeans-Debugger%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Netbeans/C2/Netbeans-Debugger/English&amp;action=history"/>
		<updated>2026-04-09T00:14:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Netbeans/C2/Netbeans-Debugger/English&amp;diff=221&amp;oldid=prev</id>
		<title>Chandrika: Created page with ''''Title of script''': Netbeans Debugger  '''Author: Sindhu '''  '''Keywords: netbeans, debugging, debug'''   [http://spoken-tutorial.org/wiki/images/1/18/Debugger-_Resources.zip…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Netbeans/C2/Netbeans-Debugger/English&amp;diff=221&amp;oldid=prev"/>
				<updated>2012-11-27T12:38:49Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;#039;&amp;#039;&amp;#039;Title of script&amp;#039;&amp;#039;&amp;#039;: Netbeans Debugger  &amp;#039;&amp;#039;&amp;#039;Author: Sindhu &amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Keywords: netbeans, debugging, debug&amp;#039;&amp;#039;&amp;#039;   [http://spoken-tutorial.org/wiki/images/1/18/Debugger-_Resources.zip…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of script''': Netbeans Debugger&lt;br /&gt;
&lt;br /&gt;
'''Author: Sindhu '''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: netbeans, debugging, debug'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://spoken-tutorial.org/wiki/images/1/18/Debugger-_Resources.zip Resources for &amp;quot;NetBeans Debugger&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border-top:0.05pt solid #000000;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:0.05pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Hello everyone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome to the tutorial on '''Netbeans''' '''Debug'''ger.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
Introduction&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| If this is the first time you are using '''Netbeans''', please view the earlier tutorials on the '''Spoken Tutorial''' website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
System Setup&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| For this demonstration, I am using the Linux Operating System Ubuntu v12.04,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and '''Netbeans''' IDE v7.1.1&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 4 &amp;amp; 5&lt;br /&gt;
&lt;br /&gt;
'''Netbeans''' '''Debug'''ger&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| We all know that '''debugging''' programs can be a rather painstaking task. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence, knowing a '''debugging''' tool and being familiar with its features can help you save valuable time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This powerful '''debugging''' tool is very useful,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
especially when you have to code or test large programs. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will learn some of the features that the '''Netbeans''' '''Debug'''ger provides. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 6 &amp;amp; 7&lt;br /&gt;
&lt;br /&gt;
Lesson Outline&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| '''This tutorial will acquaint you with'''&lt;br /&gt;
&lt;br /&gt;
* the '''debugging''' window&lt;br /&gt;
* configuring breakpoints&lt;br /&gt;
* evaluating expressions (setting watches)&lt;br /&gt;
* options for tracing the execution of your program&lt;br /&gt;
* options to configure the '''debug'''ger itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Switch to '''Netbeans''' IDE&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now Let's get started and '''debug''' this sample code. I will switch to the Netbeans IDE&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| In the '''Workspace &amp;gt;&amp;gt; '''show the project '''sampleDebug'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| I have already created a Java Application, '''sampleDebug''' in my IDE for this demonstration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| In the '''Workspace '''&amp;gt;&amp;gt; highlight to show the variables ''a,b ''&amp;amp; ''c''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| This is a small program that initializes three integer values a, b, and c. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Highlight the line ''''System.out.println(&amp;quot;Hello World! a is &amp;quot; + a);' '''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Then it prints 'Hello World!' and the value of 'a'.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Highlight the lines in the code snippet containing the '''class object '''and the line where the integer variable '''value '''is declared &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| It also creates a class object 'SampleClass', which has a 'value' integer, as a private integer value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Highlight the line in the code containing the expression '''b=a+10'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Then, it computes the value of 'b', &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Highlight the line in the code containing the expression '''c=getc(b);'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| and calls a function to compute the value of c,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Highlight the line in the code containing the statement ''''System.out.println(&amp;quot;b is &amp;quot;+b+&amp;quot; and c is &amp;quot;+c);''''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| and prints the values of 'b' and 'c'.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Within the '''Source '''&amp;gt;&amp;gt; click on the l'''ine number '''containing the line&lt;br /&gt;
&lt;br /&gt;
''''System.out.println(&amp;quot;Hello World! a is &amp;quot; + a);''''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| To start with the '''debugging''', let us first set the breakpoint.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To set a breakpoint, click on the line number. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will set at this line which prints '''Hello World!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Point to the small '''pink square''' in the line number column&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Notice that the line at which a breakpoint is set changes it's colour to pink and is marked by a small square against its line number.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Point to the highlighted line where the execution has stopped&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| When you run the program in the '''debugging''' mode, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
by clicking on the '''Debug Project '''button in the toolbar,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the execution of the program stops at the line at which the breakpoint is located.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Hover the cursor over the variable '''a, '''to view it's value''' '''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| So far, 'a's value has been set. &lt;br /&gt;
&lt;br /&gt;
Hover on it to check it's value. &lt;br /&gt;
&lt;br /&gt;
It indicates that it's value is 10.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| You can see that there are some additional windows below the workspace. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Open the '''Variables '''window below the workspace &amp;gt;&amp;gt; Point to the row containing the variable '''a'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| There is a 'Variables' window that shows a list of variables and their values. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So far, only the variable 'a' has been initialized.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus the '''Output '''window below the workspace&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| We can also look at the 'Output' window with the sample '''debug''' output. &lt;br /&gt;
&lt;br /&gt;
There is no output yet.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus the '''Debugger '''window below the workspace &amp;gt;&amp;gt; Highlight the line saying ' '''program hit a breakpoint on line 29''''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| There is also a ''''Debug'''ger Console' that says that the program hit a breakpoint on line 29 and has stopped there.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus the '''Breakpoints '''window below the workspace&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| There is also a 'Breakpoints' window that tells you that a breakpoint has been set on line number 29.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Adding Watchpoint'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the Source editor, highlight the object ''''aSample'''&amp;lt;nowiki&amp;gt;; in the code&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Before proceeding, let us see how to add a watch. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, let us say I want to watch on the integer value ''''aSample''''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus the '''Variables '''window below the workspace &amp;gt;&amp;gt; double click to '''&amp;lt;nowiki&amp;gt;&amp;lt;Enter the watch&amp;gt; &amp;lt;/nowiki&amp;gt;'''&amp;gt;&amp;gt; Enter '''a.Sample.value '''&amp;gt;&amp;gt; Click on '''OK'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| &amp;lt;nowiki&amp;gt;In the 'Variables' window below the workspace, I will double-click on &amp;lt;Enter the Watch&amp;gt; option and enter the name of the variable '&amp;lt;/nowiki&amp;gt;'''aSample.value''''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So far 'aSample' has not been created so it says it does not know the value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once it executes the line we'll know what the variable contains.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Evaluating Expressions'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the workspace &amp;gt;&amp;gt; highlight the expression '''b=a+10 '''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| In a similar way you can also watch and evaluate expressions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here I'm checking for b=a+10. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What if I wanted to know what a-4 is. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Go to the '''Debug '''menu &amp;gt;&amp;gt; select '''Evaluate Expression'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| So let me go to the '''Debug''' menu in the menu bar, and select '''Evaluate expression '''option.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Point to the '''Evaluate Code '''window &amp;gt;&amp;gt; Enter '''a-4 '''&amp;gt;&amp;gt; Click on the green evaluate button on the right side&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| The ''''Evaluate Code'''' window appears in the workspace. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here I enter the expression ''''a-4''''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Evaluate Expression button''' here, and in the Variable window, it says ''''a-4''''s value is 6.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Step-Over'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the line ''''System.out.println(&amp;quot;Hello World! a is &amp;quot; + a);' '''&amp;gt;&amp;gt; click on '''Step-Over '''button below toolbar&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Let's now proceed and execute this single line of code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do that, choose the Step-Over button from the toolbar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus '''Output '''window &amp;gt;&amp;gt; show printed line &amp;gt;&amp;gt; '''Hello World! a is 10'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| That should execute only that 1 single line (current execution line) of the code to print “Hello World”. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see the output, go to the output window and choose the sampleD'''ebug''' output. That says, '''Hello World! a is 10'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Step-Into'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| The program has now stopped (at the line) to create a SampleClass object. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| From the toolbar &amp;gt;&amp;gt; click on '''Step-Into '''option&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now, I want to go into the constructor of the SampleClass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To that I can choose the Step Into option from the toolbar. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| From the toolbar &amp;gt;&amp;gt; click on '''Step-Over '''option&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Then I can choose Step Over and see that the value came inside the constructor call is now set to 10. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Move and hover the cursor over the variable '''val '''&amp;gt;&amp;gt; '''this.val '''is set to '''10'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| I can also check that by hovering on the variable. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When I Step Over again, we can see that '''this.variable''' is now set to 10.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Step-Out'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''From the toolbar &amp;gt;&amp;gt; click on Step-Out '''option&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| To get out of this function I can either choose Continue, Step Over or Step Out. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me choose Step-Out to come out of the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And now I'm back to where the function call was made.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| From the toolbar &amp;gt;&amp;gt; click on '''Step-Over '''option&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Re-focus Variable window &amp;gt;&amp;gt; point to '''aSample.value '''&amp;gt;&amp;gt; value is set to '''10'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| When I say Step-Over again, you will notice that '''aSample.value''' is now set to10. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what we were watching for.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Run to Cursor'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place cursor near the line &amp;gt;&amp;gt; '''d=b-5;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Apart from Breakpoints and StepOvers, you can also stop the execution of the program at the line of the cursor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, let me go into the function here and set the cursor to be on this line which says '''d=b-5; '''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| From the toolbar &amp;gt;&amp;gt; click on '''Run to Cursor '''option&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now from the toolbar, choose the Run To Cursor option. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will notice that the execution of the program gets into the function and stops at the line where the cursor is located.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Show execution upto line'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Re-focus the '''Variable '''window &amp;gt;&amp;gt; point to the variable '''b '''&amp;gt;&amp;gt; value is set to '''20'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| You can see that it has computed the value of b, as 20. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And inside the variable window, it has set 'b' to be 20.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus the '''Variable '''window &amp;gt;&amp;gt; point to the variable '''d '''&amp;gt;&amp;gt; value is set to '''15'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now, I can choose Step Over again and d's value also gets initialized and becomes 15.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now, I can either choose to return or completely finish the execution of the program. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| From the toolbar''' &amp;gt;&amp;gt; '''click on''' Step-Out '''option&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Let me choose Step Out and come back to the function call.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Move cursor over '''getC() '''&amp;gt;&amp;gt; value is '''15'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| When you hover on the '''getC()''' function, you'll notice that the function has (returns) a value of 15. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| (variable) 'c' has not yet been assigned that value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus the '''Variable '''window &amp;gt;&amp;gt; point to the variable '''c '''&amp;gt;&amp;gt; value is set to '''15'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| So, when we Step Over and execute that line, 'c' will get a value of 15. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can now check it in the variable window or hover on the variable to check it's value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Finish Debugger Session'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to''' Finish Debugger Session '''option in toolbar&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now if you want to stop the '''debugging''' session, you can choose the '''Finish Debugger Session''' option from the toolbar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Point to''' Continue '''option in toolbar&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| If you want to continue (the execution) to the next breakpoint you can choose the '''Continue '''option. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Click on '''Continue '''option&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Once you finish, you can also choose the Continue option to complete the execution of the (remaining) program. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me choose '''Continue '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Re-focus '''output '''window to show output &amp;gt;&amp;gt; '''b is 20 and c is 15'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| In the Output window, it shows me the output as: '''b is 20 and c is 15'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Now, this was a quick overview of the options of '''debugging''' on '''netbeans'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Tools &amp;gt; Options &amp;gt; Miscellaneous &amp;gt; Java Debugger'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| If you want any advanced feature settings, you can -&lt;br /&gt;
&lt;br /&gt;
Go to '''Tools '''menu, click on '''Options, '''go to '''Miscellaneous '''option, click on the '''Java Debugger '''tab.&lt;br /&gt;
&lt;br /&gt;
Here you can change settings for multi-threaded program breakpoint (options). Or have filters to decide on which methods you would want to step in. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 8 &amp;amp; 9&lt;br /&gt;
&lt;br /&gt;
Assignment&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| '''Now to the assignment.'''&lt;br /&gt;
&lt;br /&gt;
As an assignment, take any of your programs, excellent if it has already errors. If not, introduce some errors with the logic or algorithm.&lt;br /&gt;
&lt;br /&gt;
# Set breakpoints in the code. Usually, you would set a break at the calling point of a function which you suspect has the error.&lt;br /&gt;
# Use '''Step-Into''' to go into the function.&lt;br /&gt;
# Use '''Step-Overs''' to execute the lines and make sure to inspect the values of variables in the variable window.&lt;br /&gt;
# Add some watches to help you identify and correct the error.&lt;br /&gt;
# Step-Out of the method.&lt;br /&gt;
# Continue till you reach the next breakpoint.&lt;br /&gt;
# Finish the '''debug'''ger session and Run your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 10 &amp;amp; 11&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| '''Recap.'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we became familiar with the '''netbeans''' '''debug'''ger.&lt;br /&gt;
&lt;br /&gt;
# We saw how to set breakpoints and watches.&lt;br /&gt;
# Add expressions which we want to evaluate, while the code is running.&lt;br /&gt;
# Trace execution of a program with Step-Into, Step-Over, Step-Out and Run-to-Cursor options.&lt;br /&gt;
# Also saw how to configure the '''debug'''ger for advanced '''debugging'''.&lt;br /&gt;
&lt;br /&gt;
Hope this tutorial saves you a lot of time in your testing and '''debugging''' tasks.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 12&lt;br /&gt;
&lt;br /&gt;
About the Spoken Tutorial Project&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Watch the video at the link shown on the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It summarizes the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 13&lt;br /&gt;
&lt;br /&gt;
Spoken Tutorial Workshops&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using Spoken Tutorials&lt;br /&gt;
* Gives certificates to those who pass an online test&lt;br /&gt;
* For more details, contact us at [mailto:contact@spoken-tutorial.org contact@spoken-tutorial.org]&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 14&lt;br /&gt;
&lt;br /&gt;
Acknowledgements&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| Spoken Tutorial Project is a part of the Talk to a Teacher Project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is supported by the National Mission on Education through ICT, MHRD, Government of India.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More information on this Mission is available at http://spoken-tutorial.org/NMEICT-Intro&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 15&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;&amp;quot;| About the Contributor&lt;br /&gt;
&lt;br /&gt;
This tutorial has been contributed from IT for Change&lt;br /&gt;
&lt;br /&gt;
Thank you for joining us.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>