Skip to content

Can i start deifferent debug session in one jdt.ls #597

Description

@EricCD-S

Now if i want to debug different code , i have to start a new jdt.js process to start a debug session. Can i start different debug session in one jdt.ls process to debug different code? i send several start debug session requests to jdt.ls but get the same port number.

Activity

  1. github-actions commented on Nov 14, 2025

    @github-actions

    Hi EricCD-S, 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.

    It isn’t currently possible to host more than one distinct debug session in a single jdt.ls process—every startDebugging call will reuse the same JDWP port. You have two options:

    • Spawn a separate jdt.ls process per session. Each instance will pick (or be configured with) its own debug port.
    • Switch to “attach” mode and configure multiple debug configurations in your launch.json, each using a different port; then start each JVM with its own -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=<port>.

    References:

    • One jdt.ls instance to handle multiple clients (discusses multiplexing LSP workloads; debug support is similarly single-session per process)
    eclipse-jdtls/eclipse.jdt.ls#741

    Other references with low confidence

    • Debug multiple applications running in a single Weblogic server (asks about multiple debug sessions in VS Code; suggests using separate ports/workspaces)
    microsoft/vscode-java-debug#1345

    • Run debug with a single command/click (talks about managing JDWP options in Gradle tasks, not about jdt.ls session multiplexing)
    microsoft/vscode-gradle#244 (comment)

    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!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions