Moving the instruction pointer while debugging Java in Eclipse

后端 未结 10 1507
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:13

    unfortunately not possible to step forward with instruction pointer (program counter), so what you need to do instead is to introduce your own "debugging" variables that you can test on - lets say you want to step around a loop that takes too long, then add a variable and test on its increased value and then encapsulate the loop in an if with that variable. I know this is ugly, but it gets it done - or you could just develop in C++ :-)

提交回复
热议问题