JetBrains Fleet 1.44 Help

HotSwap

When you're making changes to your code, you might want to immediately see how they will behave at runtime without shutting down the process. The HotSwap mechanism lets you do that by reloading the classes changed during a debugging session.

Reload changed classes

  1. Suspend the program.

  2. Press ⌘ ⇧ K and start typing Reload Changed Classes. Select Reload Changed Classes.

    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. In this case, the frame is displayed 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: 20 September 2024