-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support debug test. #161
Comments
Ah this is different from what I was thinking about. My original thought is that, just having a flag to tell whether this is a debug request. And then use |
And then on the client side you attach to process? |
Yes, and we don't need to care about the client debug adapter implementation. |
You could test this without any BSP changes. Both debugTestsOn adds Although The issue with adding a flag to BSP is that's not language agnostic. Do all languages debug by attaching to a port number? Maybe it doesn't matter if we're using |
Yes this is the reason I was thinking about not to append jdwp args at first. I'll think twice to see what is the best way to do that. |
I tried directly add jdwp args to the jvm agument list, but it's not working. Looks like the jdwp args are applied to the gradle daemon process, not the jvm for test execution. Meanwhile, A workaround I found is using initscript, sth like:
|
So far, it turns out that client can make a debug session for test on its own. Here is an example which uses init script: microsoft/vscode-gradle#1536 I'll close this ticket now since looks like no specific thing is needed right now on the server side. |
@jdneo I think
Metals
used debugSessionStart but forDebugSessionParamsDataKind
used the same data kinds we use for tests e.g.scala-test-suites-selection
andscala-test
.What's kind of interesting is that different clients might want different debug adapters....
Metals
is primarily for Scala development so it uses https://github.com/scalacenter/scala-debug-adapterFor Kotlin there is https://github.com/fwcd/kotlin-debug-adapter
Java has https://github.com/microsoft/java-debug
I imagine the Java one is good enough for all but it would be handy to be able to specify the type in the BSP command and have the build server kick start the relevant one. Another thing to propose to add to BSP spec.
Originally posted by @Arthurm1 in #144 (comment)
The text was updated successfully, but these errors were encountered: