Set Up an FE Development Environment with VSCode
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.
1. Prerequisites
| 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.
2. Clone and Open the Source Code
-
Download the source code from GitHub:
git clone https://github.com/apache/doris.git -
Open the
fedirectory under the source tree in VSCode (not the entire repository root).
3. Configure VSCode
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"
}
4. Compile FE
For the full compilation procedure, refer to:
5. Configure Remote Debugging
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.
6. Frequently Asked Questions (FAQ)
Q1: The Java extension reports that the JDK version is too low
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.
Q2: Maven tasks fail / mvn is not found
Confirm that maven.executable.path points to a valid mvn executable, or add it to the system PATH.
Q3: Remote debugging cannot connect
- Confirm that the FE process has actually loaded the JDWP parameters (check the command line with
ps -ef | grep java). - Confirm that the
addressport is not blocked by a firewall. - If
suspend=yis used, FE will block waiting for the debugger to attach. Change it tosuspend=n, or attach the debugger proactively.