| Author |
Run a Program until specified line
|
Roger Fed
Ranch Hand
Joined: Oct 17, 2010
Posts: 82
|
|
Hello, I've one Question about using NetBeans.
How can i run my program until specified line ???
thanks in advance.
|
I Hear I Forget, I See I Remember, I Do I Understand.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
You can set a breakpoint on the line that you want the debugger to stop, and then run the program in debug mode.
Put the cursor on the line, then select Debug / Toggle Line Breakpoint (Ctrl + F8). Then, to run it, select Debug / Debug Project or Debug File (if the file contains the main() method). The program will stop in the debugger when the line is reached, and then you can step through it, looking at the values of variables, or let it continue running.
Have a look at: NetBeans Debugger - Short Tutorial.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Roger Fed
Ranch Hand
Joined: Oct 17, 2010
Posts: 82
|
|
Thanks very much for your help and your valuable link.
|
 |
 |
|
|
subject: Run a Program until specified line
|
|
|