How to live update debug code in IntelliJ

Answered

I have a code that I would like not to re-run each time I'm changing a single variable on debug, in IntelliJ. This is automatically done on the Eclipse IDE but not using IntelliJ.

How to make the program updating itself without having to re-run it

0
2 comments

To live update debug code in IntelliJ, you can follow these steps:

  1. Open your project in IntelliJ and start debugging your code.
  2. Make changes to your code in the editor and save the file.
  3. In the "Run" menu, select "Reload Changed Classes" or use the keyboard shortcut "Ctrl+Shift+F9" (Windows) or "Cmd+Shift+F9" (Mac).
  4. IntelliJ will automatically reload the changed classes and update the debug session with the new code.
  5. You can continue debugging and testing your code with the updated changes.

Note that not all changes can be reloaded dynamically, such as changes to method signatures or class hierarchies. In such cases, you may need to stop the debug session, recompile the code, and start a new debug session.

By following these steps, you can live update and debug your code in IntelliJ without having to restart the debug session every time you make changes to your code.

0

Please sign in to leave a comment.