Skip to main content

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

ComponentVersion RequirementPurpose
JDK11+ (required by the Java extension); JDK 8 can be used for compilationInstall both and switch via configuration
VSCodeLatest stable releaseEditor
Extension Pack for JavaLatest versionJava language support
Remote extensionsRemote - SSH / Remote - WSL / Remote - ContainersRemote 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

  1. Download the source code from GitHub:

    git clone https://github.com/apache/doris.git
  2. Open the fe directory 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 itemDescription
java.configuration.runtimesRegisters the list of available JDKs, used by the Java extension per project
java.jdt.ls.java.homePoints to the JDK 11+ directory used by the vscode-java extension itself
maven.executable.pathPoints 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 parameterValueDescription
transportdt_socketUse Socket transport
serveryStart as the debug server and wait for a debugger to attach
suspendnDo not suspend at startup; run normally
address5005Listening 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 address port is not blocked by a firewall.
  • If suspend=y is used, FE will block waiting for the debugger to attach. Change it to suspend=n, or attach the debugger proactively.