1

it happens to me many times: I'm stepping with the debugger through my code, and ups! i made one step too far! Debugging, and made one step over too farenter image description here

what now? restart the whole debugging session?

actually, there is a way to go ‘backwards’

  • possible duplicate of https://stackoverflow.com/questions/4331336/how-to-step-back-in-eclipse-debugger . Please check in SO before posting your questions as other users may downvote or close your question. – Umeshwaran Jun 03 '21 at 14:52
  • You can't go back one line , but you can move to previous point or function start – Umeshwaran Jun 03 '21 at 14:53

1 Answers1

2

The feature is called 'Drop to frame' right click on any line in stack, choose 'Drop to frame' and you go back to selected method beginning

https://help.eclipse.org/2021-03/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/debug/ref-droptoframe.htm

You can only jump to the start of the current function . Please keep that in mind.

Drop to Frame

Umeshwaran
  • 627
  • 6
  • 12
  • 2
    And if it's not obvious, "Drop to Frame" will not be able to reset any changes that were made to objects in the heap between the first line and the line you reached when you clicked "Drop to Frame". – David M. Karr Jun 03 '21 at 22:13