How to step one step back in IntelliJ?

前端 未结 2 551
故里飘歌
故里飘歌 2020-12-24 00:22

Is it possible to step backwards through executed code in a debug session?

For example I step over a method called abc() expecting to get 12

相关标签:
2条回答
  • 2020-12-24 00:54

    Check out Chronon Debugger plugin which actually allows you to step back, not just drop the frame http://blog.jetbrains.com/idea/2014/03/try-chronon-debugger-with-intellij-idea-13-1-eap/

    0 讨论(0)
  • 2020-12-24 00:56

    You can drop the frames until you reach the point where you want to be. This isn't exactly stepping backwards, but it is quite similar in a lot of respects.

    Though as Tiago mentions below this will not revert the global state of your application -- which isn't a huge concern if you're developing stateless services, but could be if you're developing swing applications (if anyone actually does that any more).

    On the debugger toolbar it looks like this: Drop Frame. In Idea 2016.3 and later the drop-frame icon looks like this

    Full documentation is available here: IntelliJ Debugger Docs, and there is a StackOverflow Drop Frame Question, with a few useful answers

    0 讨论(0)
提交回复
热议问题