Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runInTerminal reverse-request missing cwd key #251

Open
puremourning opened this issue Dec 20, 2018 · 2 comments
Open

runInTerminal reverse-request missing cwd key #251

puremourning opened this issue Dec 20, 2018 · 2 comments

Comments

@puremourning
Copy link

@puremourning puremourning commented Dec 20, 2018

According to the DAP specification, the cwd key in the runInTerminal request is mandatory.

https://microsoft.github.io/debug-adapter-protocol/specification#Reverse_Requests_RunInTerminal

however, the java debug server sends the request without this key:

2018-12-20 00:03:04,861 - DEBUG - Message received: {'command': 'runInTerminal', 'arguments': {'kind': 'integrated', 'title': 'Java Debug Console', 'args': ['/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/bin/java', '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:53159', '-Dfile.encoding=UTF-8', '-cp', '/Users/ben/.vim/bundle/vimspector/support/test/java/test_project/target/classes', 'com.vimspector.test.TestApplication', 'hello', 'world!']}, 'seq': 2, 'type': 'request'}

of course, clients could work around this, but it would be nice for the server to include the required parameter.

@testforstephen
Copy link
Contributor

@testforstephen testforstephen commented Feb 14, 2019

@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 cwd key from launch.json to the client.

How did you use java debug server? VS Code Debugger for Java extension or self implemented debugger?

@puremourning
Copy link
Author

@puremourning puremourning commented Sep 30, 2020

Thanks

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.