import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl';
| 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 |
| WebStrom | Professional | N/A |
:::danger ISSUES
Debugging feature has issue with Kind
:::
- Select the workload that you want to debug
- Right-click the workload and select
Dev Config, configure your debugging configuration - Then right-click this workload again and select Remote Debug
- Nocalhost will automatically enter the
DevModeand start remote debugging
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.
:::tip 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.
:::
The development environment is different between developers. You should configure remote debug configurations according to the actual situation.
<Tabs defaultValue="java" values={[ {label: 'Java', value: 'java'}, {label: 'Python', value: 'python'}, {label: 'Go', value: 'go'}, {label: 'PHP', value: 'php'}, {label: 'Node.js', value: 'node'}, ]}>
name: java-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 5005
...The shell command for Maven example:
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
The startup command for Gradle example:
./gradlew bootRun --debug-jvm --no-daemonname: python-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 9009
...#! /bin/sh
pip3 install --no-cache-dir -r ./requirements.txt
export DEBUG_DEV=0
export FLASK_DEBUG=0
export FLASK_ENV=development
flask run --host=0.0.0.0 --port=9999
How does it Works?
Nocalhost using pydevd to debug Python application.
Principle of Remote Python Debuggingname: go-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 9009
...#! /bin/sh
export GOPROXY=https://goproxy.cn
dlv --headless --log --listen :9009 --api-version 2 --accept-multiclient debug app.go
name: php-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 9003
...#!/bin/sh
php -t ./ -S 0.0.0.0:9999;
How does it works?
Nocalhost using Xdebug to debug PHP applications.
Principle of Remote PHP Debuggingname: nodejs-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 9229
...#!/bin/sh
npm install
node --inspect=0.0.0.0:9229 ./index.js
})
})
})