• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Run a Program until specified line

 
Roger Fed
Ranch Hand
Posts: 82
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I've one Question about using NetBeans.
How can i run my program until specified line ???
thanks in advance.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15448
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Roger Fed
Ranch Hand
Posts: 82
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much for your help and your valuable link.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic