Skip to content

Commit 39347a3

Browse files
authored
Merge pull request #15287 from apache/intellij-hotswap-debug
Add IntelliJ IDEA Enhanced HotSwap to reloading guide
2 parents 48e9045 + 31a766c commit 39347a3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ specific language governing permissions and limitations
1717
under the License.
1818
////
1919

20-
Spring Boot Developer Tools, JRebel, and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all three tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities.
20+
Spring Boot Developer Tools, JRebel, IntelliJ IDEA Enhanced HotSwap in Debug Mode, and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all four tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities.
2121

2222
=== Spring Boot Developer Tools
2323

@@ -38,8 +38,19 @@ JRebel is a commercial tool that provides advanced hot swapping capabilities, al
3838

3939
Please see the JRebel documentation for more details: https://manuals.jrebel.com/jrebel/standalone/springboot.html[JRebel].
4040

41+
Alternatively, use the JRebel plugin for IntelliJ IDEA: https://plugins.jetbrains.com/plugin/4441-jrebel-and-xrebel[JRebel IntelliJ Plugin].
42+
4143
*Reloading Mechanism:* True hot swapping via bytecode instrumentation; reloads classes, configurations, and resources without restarting the JVM, preserving application state.
4244

45+
=== IntelliJ IDEA Enhanced HotSwap in Debug Mode
46+
IntelliJ IDEA Enhanced HotSwap is a feature available in the IntelliJ IDEA IDE that allows developers to reload code changes while debugging their applications. When running a Grails application in debug mode, IntelliJ IDEA can reload modified classes without requiring a full application restart. This feature is particularly useful for making quick changes and testing them during a debugging session.
47+
48+
*Reloading Mechanism:* Enhanced hot swapping using IntelliJ's debugging capabilities; reloads modified classes during a debug session, with limitations on structural changes.
49+
50+
Please see the IntelliJ IDEA documentation for more details: https://www.jetbrains.com/help/idea/altering-the-program-s-execution-flow.html#reload_classes[IntelliJ IDEA Enhanced HotSwap].
51+
52+
Using https://github.com/JetBrains/JetBrainsRuntime[JetBrains' Runtime] and jvmArgs `-XX:+AllowEnhancedClassRedefinition` on the `bootRun` task overcomes some of these limitations.
53+
4354
=== Hotswap Agent
4455

4556
*Hotswap Agent support for Grails is considered experimental, and it may not work in all cases. Known limitations are documented https://github.com/apache/grails-core/issues/14967[here].*

0 commit comments

Comments
 (0)