How to enable Intellij hot code swap

前端 未结 8 1484
清歌不尽
清歌不尽 2020-12-22 20:53

Intellij does not seem to be doing basic hot code swap on my installation.

For this code:

public class MainTest {
    public void method1() {
                


        
8条回答
  •  半阙折子戏
    2020-12-22 21:25

    I encountered this problem on Ubuntu. I also had an apparently unrelated issue where IntelliJ gave an error about the file watch limit (my apologies that I no longer have the exact error message). To solve this later issue I did the following steps:

    1. Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:

      fs.inotify.max_user_watches = 524288
      
    2. Then run this command to apply the change:

      sudo sysctl -p --system

    Now my React components rebuild and hot swap just fine.

    Source

提交回复
热议问题