-
Notifications
You must be signed in to change notification settings - Fork 315
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
improvement: add debug adapter for running main class to metals #6383
base: main
Are you sure you want to change the base?
Conversation
@kasiaMarek It's great that Metals will be able to debug without the BSP server having to support it. In Why not use the BSP It wouldn't simplify running main classes much but then you can debug tests in the same way using |
2dfe4b4
to
a641cf6
Compare
Sorry for taking so long to write back, it slipped my mind.
We can do that but as you've noticed there isn't much of a benefit to it.
We need events, if we just run the test like this we'd only get the output. So it's not really an easier option. (But I feel like I only have a partial understanding of this so correct if I'm wrong.) |
Do you mean test events? You'd get those through BSP Test Report messages. Does Metals currently discover/run tests itself rather than delegating to BSP? I'd argue that it's the Build Server's responsibility to do this as it should already understand the test frameworks it supports and then Metals doesn't have to understand any test frameworks, however BSP doesn't allow test discovery at the method level (only class level) and I can't currently see how it's possible to obtain EDIT: I don't think there's a way to send back stacktraces of failed tests from BSP either. |
Oh, yes, that should in theory work. But besides the inability to run only test selection there seem to be other issues there. The biggest is that the run output gets send to
I think we simply always start debug server to run tests. |
Ah - I hadn't realised that the build tools don't even send back TestReports. Probably best to just handle it all within Metals I guess. |
connected to: #5928
requires scalacenter/scala-debug-adapter#704 first