Skip to content

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

Description

@mozhuanzuojing
Image

Activity

  1. github-actions commented on Dec 14, 2025

    @github-actions

    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:
      "java.home": "/path/to/your/jdk-17"
      in your settings.json and reload VS Code.
    • 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:

    Other references with low confidence

    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!

  2. chagong commented on Dec 15, 2025

    @chagong
    Contributor

    Hi mozhuanzuojing, can you briefly describe in what way it's not working?

  3. mozhuanzuojing commented on Dec 15, 2025

    @mozhuanzuojing
    ContributorAuthor

    Changyong Gong (@chagong) Exception status information is as follows.

    Image

    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 response
    

    env

    Image
  4. chagong commented on Dec 16, 2025

    @chagong
    Contributor

    mozhuanzuojing I just made a prerelease version 0.58.2025121609, can you try if it solves the problem?

  5. mozhuanzuojing commented on Dec 16, 2025

    @mozhuanzuojing
    ContributorAuthor

    Changyong Gong (@chagong) Great, thank you! The debug tool is working fine now in the latest prerelease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions