scalacenter / scala-debug-adapter

Implementation of the Debug Adapter Protocol for Scala
Apache License 2.0
58 stars 26 forks source link

Auto-add in sbt-jdi-tools when using java8 #59

Open er1c opened 3 years ago

er1c commented 3 years ago

Warning:

[warn] The sbt-debug-adapter cannot work because the JDI tools are not loaded.
[warn] 
[warn] Consider adding the sbt-jdi-tools plugin to your `./project/project/plugins.sbt` file:
[warn] addSbtPlugin("org.scala-debugger" % "sbt-jdi-tools" % "x.y.z")
[warn] 

Possible solution: https://github.com/ensime/scala-debugger/blob/f8e69614d71786605b4baa8c62f0968683936d22/project/plugins.sbt#L7-L16

Needs to be adapted/tested in the AutoPlugin probably. And version should be 1.1.1

adpi2 commented 3 years ago

Another possible solution:

The hard part is to create a correct class loader:

All in all this solution seems a bit too convoluted. It will be hard to make it work and it will be hard to maintain.