This document describes how to use VSCode to set up a Doris FE development environment on a development machine, in WSL, or in Docker. Developers who prefer VSCode can use the Remote extensions for remote development and debugging.
| Component | Version Requirement | Purpose |
|---|---|---|
| JDK | 11+ (required by the Java extension); JDK 8 can be used for compilation | Install both and switch via configuration |
| VSCode | Latest stable release | Editor |
| Extension Pack for Java | Latest version | Java language support |
| Remote extensions | Remote - SSH / Remote - WSL / Remote - Containers | Remote development |
It is recommended to install JDK 11 and JDK 8 separately under an isolated directory such as ~/lib, used for the IDE extensions and source compilation respectively.
Download the source code from GitHub:
git clone https://github.com/apache/doris.git
Open the fe directory under the source tree in VSCode (not the entire repository root).
Create settings.json under fe/.vscode/ and configure the Java runtime and Maven path.
| Configuration item | Description |
|---|---|
java.configuration.runtimes | Registers the list of available JDKs, used by the Java extension per project |
java.jdt.ls.java.home | Points to the JDK 11+ directory used by the vscode-java extension itself |
maven.executable.path | Points to the local Maven executable, used by the maven-language-server extension |
Example:
{ "java.configuration.runtimes": [ { "name": "JavaSE-1.8", "path": "/!!!path!!!/jdk-1.8.0_191" }, { "name": "JavaSE-11", "path": "/!!!path!!!/jdk-11.0.14.1+1", "default": true } ], "java.jdt.ls.java.home": "/!!!path!!!/jdk-11.0.14.1+1", "maven.executable.path": "/!!!path!!!/maven/bin/mvn" }
For the full compilation procedure, refer to:
To debug FE remotely from VSCode, attach the JDWP parameters when FE starts:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
To do this, edit doris/output/fe/bin/start_fe.sh and append the parameters above after $JAVA $final_java_opt.
| JDWP parameter | Value | Description |
|---|---|---|
transport | dt_socket | Use Socket transport |
server | y | Start as the debug server and wait for a debugger to attach |
suspend | n | Do not suspend at startup; run normally |
address | 5005 | Listening port; customizable |
After starting FE, use the Java Debug extension in VSCode to Attach to host:5005 for breakpoint debugging.
java.jdt.ls.java.home must point to JDK 11+. Even when JDK 8 is used for compilation, the extension itself still requires JDK 11+ to run.
mvn is not foundConfirm that maven.executable.path points to a valid mvn executable, or add it to the system PATH.
ps -ef | grep java).address port is not blocked by a firewall.suspend=y is used, FE will block waiting for the debugger to attach. Change it to suspend=n, or attach the debugger proactively.