JetBrains Fleet 1.34 Help

HotSwap

Sometimes, when you're making changes to your code, you want to immediately see how they will behave in a working application without shutting down the process. The HotSwap mechanism lets you reload classes changed during a debugging session without having to restart the entire application.

Reload changed classes

  • Press ⌘ ⇧ K and start typing Reload Changed Classes. Select the Reload Changed Classes action.

    Searching for Reload Changed Classes action in the Goto popup]

HotSwap limitations

Due to VM design, HotSwap has the following limitations:

  • it is only available if a method body is modified. Changing signatures is not supported.

  • adding and removing class members is not supported

  • if the modified method is already in the call stack, the changes will take effect only after the program exits the modified method. Until that moment, the method body remains unchanged, and the frame is marked as obsolete.

If you want to remove the limitations imposed by the standard VM, you can use the Dynamic Code Evolution VM with unlimited support for reloading classes at runtime.

Last modified: 18 April 2024