Skip to main content

Jetbrains Remote Debugging

Supported IDEs#

LanguageIDEEditionRequired Plugin
JavaIntelliJ IDEAUltimateN/A
GoIntelliJ IDEAUltimateGo plugin
GoLandProfessionalN/A
PythonIntelliJ IDEAUltimatePython plugin
PyCharmProfessionalN/A
PHPIntelliJ IDEAUltimatePHP plugin
PHPStormProfessionalN/A
Node.jsIntelliJ IDEAUltimateNode.js plugin
WebStromProfessionalN/A

Debugging Process#

  1. Select the workload that you want to debug
  2. Right-click the workload and select Dev Config, configure your debugging configuration
  3. Then right-click this workload again and select Remote Debug
  4. Nocalhost will automatically enter the DevMode and start remote debugging

Debugging Configurations in IDE#

Before entering debug mode, if you do not have a Nocalhost IDE debug configuration under an existing workload, Nocalhost will create a new IDE debug configuration according to your Nocalhost configuration. Different IDE has different configuration names and templates.

Multi Configs

If you already have a Nocalhost IDE debug configuration under the existing workload, Nocalhost will use the first one to start debugging. You can change the order in the Run/Debug Configurations window within IDE.

Nocalhost debugging configurations in IDE

Configuration#

The development environment is different between developers. You should configure remote debug configurations according to the actual situation.

Sample Configuration#

Nocalhost Configs
name: java-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 5005
...

Maven Example#

The shell command for Maven example:

jdk >= 1.8 and springBoot >=2.2.1.RELEASE
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

For jdk <=1.7 you should replace -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 with -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

For lower version of the springBoot you should replace -Drun.jvmArguments with -Dspring-boot.run.jvmArguments

Gradle Example#

The startup command for Gradle example:

Gradle's debug.sh
./gradlew bootRun --debug-jvm --no-daemon
Last updated on by Tank Xu