跳转至

热重载

什么是热重载?

您在 IDE 中修改的文件将实时同步到远程容器,并且您的运行/调试命令将重新执行。

支持的 IDE

Language IDE Edition Required Plugin
Java IntelliJ IDEA Ultimate N/A
Go IntelliJ IDEA Ultimate Go plugin
GoLand Professional N/A
Python IntelliJ IDEA Ultimate Python plugin
PyCharm Professional N/A
PHP IntelliJ IDEA Ultimate PHP plugin
PhpStorm Professional N/A
Node.js IntelliJ IDEA Ultimate N/A
WebStorm Professional N/A

如何启用热重载?

  1. 选择要运行/调试的工作负载
  2. 右键单击工作量并选择 Dev Config, 配置 hotReload: true

示例配置

Nocalhost Configs
name: java-remote-run
serviceType: deployment
containers:
  - name: "reviews"
    dev:
      image: codingcorp-docker.pkg.coding.net/nocalhost/dev-images/java:latest
      shell: bash
      workDir: /home/nocalhost-dev
      command:
        debug:
          - ./gradlew
          - bootRun
          - --debug-jvm
          - --no-daemon
      hotReload: true
      debug:
        remoteDebugPort: 5005