Moving the instruction pointer while debugging Java in Eclipse

后端 未结 10 1447
Happy的楠姐
Happy的楠姐 2020-12-13 23:16

Can I move the instruction pointer directly to a line of my choice (within the current method) while debugging a Java program in Eclipse (Galileo)?

10条回答
  •  时光说笑
    2020-12-14 00:06

    Moving the pointer like in Visual Studio is not possible, however workarounds are:

    Going backwards to the beginning of the currently executed method: Select the method from the debug call stack, right click -> "Drop to frame" et voila you're back at the beginning of the method.

    Now to reach your desired line select the line by clicking in it and hit ctrl+r or right click the line and select "Run to line".

    These techniques are hugely helpful and reduce debugging efforts massively, enjoy!

提交回复
热议问题