8

During debugging in Eclipse , my code went into the while loop ( I dont want to loop until the condition is met )

so please tell me how to come out of while loop during debugging ??

And i see that F7 is disabled under Debug Menu

please see the screen shot here

http://tinypic.com/view.php?pic=wajzeu&s=5

Revathi
  • 1,193
  • 9
  • 19
  • 24

2 Answers2

21

You can select the line that is just outside your while loop in the code editor, then right click and choose Run to Line in the context menu (Or simply use the default hotkey Ctrl + R )

enter image description here

Ken Chan
  • 84,777
  • 26
  • 143
  • 172
  • can you post the code of the program ? and can the while loop exist if you run the program normally (with debug mode)? – Ken Chan Nov 13 '11 at 03:42
  • 3
    Yes the code is fine and runs good , and What i did to solve the problem is , i put another break point after while loop and used F8 – Revathi Nov 13 '11 at 07:04
0

Pressing ctrl+R is the correct option but if your break point is on a line which is inside the for loop, then you will have to first remove the break point and then press ctrl+R on the line on which you want the control to land. I faced this issue while debugging.

Amit
  • 21
  • 1