You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the java debug server will send cwd key from launch.json to the client
Is that a mandatory launch parameter ? The adapter seems to work fine without it and the docs for vscode suggest it's optional: "cwd - The working directory of the program. Defaults to ${workspaceFolder}."
I guess the vscode-java plugin always sets it ? Is there a specification for the arguments accepted/required by this adapter when not using vscode-java ?
How did you use java debug server? VS Code Debugger for Java extension or self implemented debugger?
In Vimspector - another DAP client accessing java-debugger through eclipse.jdt.ls.
Hi Ben Jackson (@puremourning), 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.
Update the Java Debug adapter to populate cwd when sending the request. In LaunchRequestHandler.java, locate where you build the RunInTerminalRequestArguments and change it from:
newRunInTerminalRequestArguments(kind, title, /* no cwd */, args);
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!
Activity
testforstephen commentedon Feb 14, 2019
Ben Jackson (@puremourning) Follow the code https://github.com/Microsoft/java-debug/blob/master/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchWithDebuggingDelegate.java#L75, actually the java debug server will send
cwdkey from launch.json to the client.How did you use java debug server?
VS Code Debugger for Javaextension or self implemented debugger?puremourning commentedon Sep 30, 2020
Thanks
Is that a mandatory launch parameter ? The adapter seems to work fine without it and the docs for vscode suggest it's optional: "cwd - The working directory of the program. Defaults to ${workspaceFolder}."
I guess the vscode-java plugin always sets it ? Is there a specification for the arguments accepted/required by this adapter when not using vscode-java ?
In Vimspector - another DAP client accessing java-debugger through eclipse.jdt.ls.
github-actions commentedon Nov 14, 2025
Hi Ben Jackson (@puremourning), 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.
According to the DAP spec, the
cwdfield is mandatory onrunInTerminalreverse-requests: https://microsoft.github.io/debug-adapter-protocol/specification#Reverse_Requests_RunInTerminalUpdate the Java Debug adapter to populate
cwdwhen sending the request. InLaunchRequestHandler.java, locate where you build theRunInTerminalRequestArgumentsand change it from:to something like:
Similar high-confidence reference:
• Unknown event "processid" (Unknown event "processid" #460): notes other DAP-spec mismatches in the Java Debug server, including runInTerminal details. Unknown event "processid" #460
Other references with low confidence
cwdin launch configs for input redirection. Can't read an input (debug console) redhat-developer/vscode-java#415The 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!