-
Notifications
You must be signed in to change notification settings - Fork 166
Java Debug Server
microsoft/java-debug implements server-side Java debugging. The page distinguishes that server from the VS Code debugger extension: this component exposes JDT Language Server (JDTLS) delegate commands and runs the protocol server; it does not describe VS Code debug UI or launch.json editing.
The plugin contributes JavaDebugDelegateCommandHandler to JDTLS's org.eclipse.jdt.ls.core.delegateCommandHandler extension point. Its registered commands include starting a debug session, resolving classpaths and main classes, validating launch configuration, updating debug settings, and resolving source/class-filter information. The handler starts the singleton JavaDebugServer for vscode.java.startDebugSession and returns its port; the other commands are handled by the server-side delegate implementations.
JavaDebugServer creates a server socket, accepts connections, and creates a ProtocolServer for each connection with a JDT-backed provider context. ProtocolServer creates a DebugAdapter and dispatches protocol requests through it. DebugAdapter registers common initialization/launch handlers and debug-mode handlers for attach, breakpoints, stepping, stack/scopes/variables, evaluation, hot-code replace, completions, exception information, data breakpoints, and related requests; its no-debug mode has a narrower handler set.
This component entry was added while onboarding microsoft/java-debug after PR #635. The behavior above was verified against source commit 7a625c6ff35f95e92ce232fcf6f0af64b9ce715b:
-
com.microsoft.java.debug.plugin/plugin.xml— JDTLS delegate-command contribution and command IDs. -
JavaDebugDelegateCommandHandler— command routing and debug-server startup. -
JavaDebugServer— socket listener, per-connection protocol server, and JDT provider context. -
ProtocolServerandDebugAdapter— protocol dispatch and handler registration.