How to go back and forth in debugging mode?
Answered
In debugging, I often found it useful to be able to go back to some point before the current cursor and re-debug a block of code that I already debugged once, because I need to debug multiple times to understand the logic. Now in order to do this, I have to stop the application and start all over again, this seems not that efficient. In Eclipse Java, I could go back to the top of the function and re-debug from there and that helps a lot.
Can I achieve the 'back and forth' purpose in debugging in PyCharm? Thanks.
Please sign in to leave a comment.
Hi
I think you are looking for Jump to Cursor feature https://www.jetbrains.com/help/pycharm/jumping-to-line.html
This is really cool. Thanks.
I love the Pycharm debugger, and it would be great to have the inverse/undo step or the step back button. If I do a step into and I want to come back to the previous step I have to rerun all code (with breakpoint or cursor).
By the way, the run to cursor function doesn't work well, sometimes the debugger gets stuck.
Thanks for your work!!
Hello,
Regarding the inverse step in Debugger, you are welcome to submit a feature request at https://youtrack.jetbrains.com/issues/PY
Information on how to use YouTrack: https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications
"By the way, the run to cursor function doesn't work well, sometimes the debugger gets stuck."
- Could you please provide an example of a code and cursor location? I will try to reproduce it on my site. Please upload it to the FTPhttps://uploads.services.jetbrains.com/ and let me know the file name