1

When you compile code while debugging Intellij tries to Hot Swap the changes. If it fails it shows a message about its state and ask the developer about a restart of the debug session (to re-run the app). That message disappears after some seconds.

If you miss that message about failing Hot Swapping how do you know if the session is still in sync with the code?

Sebastian Barth
  • 4,079
  • 7
  • 40
  • 59

1 Answers1

1

Intellij 2016.1 added detection for this if you have an active breakpoint:

Sources mismatch detection

It might be very annoying and counterproductive if you're stepping over your code unaware that it does't actually match the running code. To avoid any unnecessary time waste, the IDE now immediately warns you once it sees a mismatch.
[source]

Other than that, any popups that occur are kept in the "Event Log" pane, so you could always check that, or leave it open to know if your latest hotswap was a failure. event log

phaze0
  • 1,898
  • 17
  • 22
  • I already know this feature. The problem is, if I click on "Restart debug session" it doesn't say that it is in sync again. I know it because I clicked on it but I very often click on it during debugging and often forget if I already have clicked! So this is only half the way! *This only tells me that some time ago there was a Hot Swap that failed - Did I restart the session after that?* – Sebastian Barth Sep 29 '16 at 23:17
  • Ah, I see. Unfortunately I do not think it has such an ability, especially given the wording of their "Sources mismatch detection" feature. And I'm sure you've thought of this, but you could clear the log after a restart.. – phaze0 Sep 30 '16 at 00:44