Restore Previous Debug States
In this topic:
Look Back lets you move backward in time in your debug session by restoring target state. A restored state is recorded at every stop, right before execution continues. You can return to these restored states to inspect past values without re-running the program.
This allows you to compare states, investigate regressions, or inspect a sequence of changes without restarting your session.
Navigate states via Debug | Run Control or keyboard shortcuts:
Action |
Debug menu command |
Shortcut |
|---|---|---|
Previous state |
Look Back Prev |
CTRL + NUM 4 CTRL + 4 |
Next state |
Look Back Next |
CTRL + NUM 6 CTRL + 6 |
When you navigate to a previous state, winIDEA shows the state that was already captured at the stop:
No additional target reads occur in Look Back. You are viewing only the debugger’s cached data from the moment of the stop.
To see past values of Locals and Watches, ensure memory caching is enabled in Debug | Debug Options | Memory Access | Cache.
Memory caching lets the debugger retain stopped-state memory reads.
When you move to a previous snapshot, winIDEA enters Look Back Mode. The Look Back indicator appears in the winIDEA status bar:
LOOK BACK [-3]
The number in brackets (e.g., [-3]) shows how many snapshots behind Live you are, here we are 3 snapshots back.
•Enter in Look Back Mode automatically when you choose previous state.
•Views are read-only; you can’t modify memory or variables.
•Data shown (registers, stack, memory) is from the saved snapshot, not the live target.
•You can navigate back and forth between snapshots freely.
•Move forward to the latest snapshot to return to Live, oruse Show Execution Point, or
•Run/Step the program again, or
•Start a new debug session (snapshots are cleared).