Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restart debugging the current function in Eclipse

When stepping through a Java function using Eclipse, I noticed that saving (a change to) the sources causes Eclipse to restart debugging from the beginning of the function.

Is there a command to restart debugging the current function (or some place higher up in the call stack) without saving first?

like image 722
Micha Wiedenmann Avatar asked May 28 '13 07:05

Micha Wiedenmann


1 Answers

To improve SteveD's answer (which is correct all the way), I'll add what I do:

Go to Preferences > General > Keys and search for Drop to Frame. Now you can assign a custom shortcut for it under Binding. I use CTRL+ALT+R because I see it as the opposite of the CTRL+R (Run to) feature.

This immediately jumps to the start of the current method, no mouseclick in the stack required. You can of course still do that to jump to any frame before the current.

One thing to remember: This is not reverse debugging. It does not reset variables, so if you set static fields or something like that, they will not be reverted to a prior value!

like image 109
moeTi Avatar answered Sep 30 '22 07:09

moeTi