How do I get Groovy hotswap in intellij to work?

1.6k views Asked by At

I'm using Groovy and Google App Engine. I'm trying out Intellij, but I can't figure out how to get hotswap to work for changes to Groovy classes. It works for me in Eclipse. Is there something special I have to do for it to work in Intellij?

2

There are 2 answers

0
Raniz On

In settings (CTRL + ALT + S).

Navigate to Build, Execution, Deployment -> Debugger -> HotSwap.

In here make sure that Enable hot-swap agent for Groovy code and Reload classes in background are checked and that either Always or Ask are selected for Reload classes after compilation.

Hotswap settings

You need to run your app in debug mode and you need to make (CTRL + F9, or Build -> Make Project) after you've done any changes.

You should see a green text bubble pop up if your classes were reloaded and a red one if they couldn't be reloaded for some reason.

Successful hotswap Failed hotswap

0
CrashOverload On

To configure reloading behavior:

  1. On the main menu, choose File | Settings , and then expand the Debugger node.
  2. Open HotSwap page.
  3. Click one of the radio buttons in the group Reload classes after compilation. You can opt to always reload classes, reload after confirmation, or never do it.

Also check the Enable hot-swap agent for Groovy code option in

File -> Settings -> Debugger -> Groovy.