Repository navigation
Debugger for Java (Preview) is not working. #617
Description

Activity
Hi mozhuanzuojing, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Here are a few things to try:
- Switch off the pre-release build of the Java debugger and use the latest stable version: click Switch to Release Version on the Debugger for Java extension page.
- Make sure you have JDK 11+ installed and VS Code is pointing at it. The error “Java 11 or more recent is required…” means you’re on Java 8. Either install a newer JDK or set:
in your settings.json and reload VS Code.
"java.home": "/path/to/your/jdk-17"
- Add an explicit launch configuration so VS Code knows how to start your app. In
.vscode/launch.json:{ "version": "0.2.0", "configurations": [ { "type": "java", "name": "Debug Current File", "request": "launch", "mainClass": "${file}" } ] }
Other references worth checking:
- URGENT- “Java 11 or more recent is required to run…” — installing a JDK 11+ fixes the “Java 11…” popup (and debugger activation).
URGENT- "Java 11 or more recent is required to run. Please download and install a recent JDK" vscode-java-debug#852
Other references with low confidence
- Unable to Debug On VS Code — issues with JDT LS/Decompiler; may shed light if you see "Unable to load IDecompiler class" in logs.
Unable to Debug On Vscode vscode-java-debug#1385 - Getting java.lang.UnsupportedClassVersionError when debugging tests — only applies if you’re debugging JUnit with an older JVM.
Getting java.lang.UnsupportedClassVersionError in debug console when trying to run or debug any test vscode-java-test#1194
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
Hi mozhuanzuojing, can you briefly describe in what way it's not working?
Changyong Gong (@chagong) Exception status information is as follows.
After starting the debug process, an error occurs in the log output.
[Trace - 4:59:44 PM] Received notification 'window/logMessage'. [Error - 4:59:44 PM] Dec 15, 2025, 4:59:44 PM [error response][stackTrace]: Cannot read field "path" because "lspFrame.source" is null java.lang.NullPointerException: Cannot read field "path" because "lspFrame.source" is null at com.microsoft.java.debug.core.adapter.handler.StackTraceRequestHandler.handle(StackTraceRequestHandler.java:118) at com.microsoft.java.debug.core.adapter.DebugAdapter.lambda$dispatchRequest$0(DebugAdapter.java:94) at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(Unknown Source) at java.base/java.util.concurrent.CompletableFuture.thenCompose(Unknown Source) at com.microsoft.java.debug.core.adapter.DebugAdapter.dispatchRequest(DebugAdapter.java:93) at com.microsoft.java.debug.core.adapter.ProtocolServer.dispatchRequest(ProtocolServer.java:132) at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.lambda$new$0(AbstractProtocolServer.java:81) at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63) at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201) at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255) at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) [Trace - 4:59:44 PM] Received notification 'telemetry/event'. Dec 15, 2025 4:59:44 PM com.microsoft.java.debug.core.adapter.ProtocolServer lambda$dispatchRequest$1 SEVERE: [error response][stackTrace]: Cannot read field "path" because "lspFrame.source" is null java.lang.NullPointerException: Cannot read field "path" because "lspFrame.source" is null at com.microsoft.java.debug.core.adapter.handler.StackTraceRequestHandler.handle(StackTraceRequestHandler.java:118) at com.microsoft.java.debug.core.adapter.DebugAdapter.lambda$dispatchRequest$0(DebugAdapter.java:94) at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(Unknown Source) at java.base/java.util.concurrent.CompletableFuture.thenCompose(Unknown Source) at com.microsoft.java.debug.core.adapter.DebugAdapter.dispatchRequest(DebugAdapter.java:93) at com.microsoft.java.debug.core.adapter.ProtocolServer.dispatchRequest(ProtocolServer.java:132) at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.lambda$new$0(AbstractProtocolServer.java:81) at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63) at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201) at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255) at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Dec 15, 2025 4:59:44 PM com.microsoft.java.debug.core.UsageDataSession recordResponse WARNING: abnormal responseenv
Reacted by Changyong Gongmozhuanzuojing I just made a prerelease version 0.58.2025121609, can you try if it solves the problem?
Changyong Gong (@chagong) Great, thank you! The debug tool is working fine now in the latest prerelease.
Reacted by Changyong Gong and mozhuanzuojing