-
Click Tools | Debug in the Java Tools window.
-
Click Commands | stop at in the Debug window.
-
Type HelloWorld (default class name) in the Input dialog then click OK.
-
Type 33 (line number) in the Input dialog then click OK.
-
Click Commands | run in the Debug window.
-
Wait until execution stops at line 33 (the first statement in the main method).
-
Click Commands | list.
-
Wait until the source code appears with an arrow after the line number where execution stopped.
-
Click Commands | where.
-
Wait until the execution trace appears.
-
Click Commands | threads.
-
Wait until the threads appear.
-
Click Commands | threadgroups.
-
Wait until the thread groups appear.
-
Click Commands | print.
-
Type arguments (variable name) in the Input dialog then click OK.
-
Wait until the value of the arguments variable appears in the Debug window.
-
Click the Command field at the bottom of the Debug window then press the up arrow and down arrow keys.
-
Select one of the commands executed above in the Command field and press the Enter key to execute it again.
-
Wait until the command output appears.
-
Click Commands | step.
-
Wait until execution stops at line 22 (the first statement in the constructor).
-
Click Commands | next.
-
Wait until execution stops at line 24 (the second statement in the constructor).
-
Click Commands | cont (continue), or type cont in the Command field then press the Enter key.
-
Wait until execution continues and the Debug window closes.