Moving the instruction pointer while debugging Java in Eclipse

后端 未结 10 1518
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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 23:53

    A trick I use is to type a space in your class, somewhere safe such as in the comment line; immediately delete it and save the class. This forces the execution point to jump to the beginning of your current method. Not ideal, I admit, but it can sometimes be used as a workaround to achieve what you want.

    Although in the default installation of eclipse it is not possible to do directly move the execution point like in Visual Studio, there may exist an eclipse plugin which provides that functionality somewhere. Have a search around.

提交回复
热议问题