Marinos An
Marinos An

Reputation: 10828

Is there an "Apply changes" feature when remote debugging with intelij idea?

When using JPDA remote debugging feature with netbeans there is an "Apply changes" feature. This tries to apply the current code changes in the remote jvm.

Is there such a feature with intelij idea? If not, is there any other way to perform this? e.g. via command line?

Upvotes: 0

Views: 391

Answers (1)

NikolayD
NikolayD

Reputation: 11

The HotSwap mechanism in InteliJ Idea lets you reload classes changed during a debugging session without having to restart the entire application.

Reload single file

Right-click in the editor tab of the modified file and select Compile and Reload File.

You can also configure automatic reloading of classes after they have been recompiled using the Reload classes after compilation option in Settings/Preferences | Build, Execution, Deployment | Debugger | HotSwap. Automatic reloading can be enabled/disabled, or you can configure it so that the debugger asks you whether to reload the file in each specific case.

Reload all files

From the main menu, select Run | Debugging Actions | Reload Changed Classes.

Recompilation happens automatically if the Build project before reloading classes option is enabled in Settings/Preferences | Build, Execution, Deployment | Debugger | HotSwap. If this option is disabled, you need to recompile the files before reloading (Build | Recompile Ctrl+Shift+F9).

Upvotes: 1

Related Questions