
Description
I asked the following question on the Scala Discord and I was invited by @SethTisue to open a discussion here, in hopes of getting more eyes on the issue.
I'm including the text from the Discord message verbatim:
Hi. I'm working on the IntelliJ Scala plugin team, and one of my main longer term goals is improving the debugger experience. Since we're focusing on improving Scala 3 support, I've already opened a few issues in the Scala 3 repo that tackle changes that benefit all debuggers (both IntelliJ and Metals). These usually come in the form of backend changes and fixes which output JVM bytecode that lends itself for better inspection. Despite bugs and optimization opportunities (this is not a criticism, just pointing out the fact that Scala 3 is a new compiler), I'm pleased to say that Scala 3 has indeed given tooling developers (talking about debuggers) more and better bytecode to work with (even though not all of these opportunities are taken advantage of, I for one am working on that).
My question is, geared more towards the Scala 2 backend people, how feasible would it be and is there any willingness to backport some of these changes, so that the debugging experience in Scala 2 can also be improved. I'm asking here, because I don't think these are necessarily bugs, but more like "tooling focused feature requests" without any language changes (and so this question doesn't really belong on the GitHub issue tracker).
I would love to discuss some examples. Looking forward to your responses. I'm tagging @lrytz (looking at the GitHub readme for Scala 2, they are a person to talk to about the backend), but also feel free to tag other people that have relevant knowledge of this area, and of course, anyone else is welcome to chime in. Thanks in advance.
I would like to use this tracking issue to present current pain points with the Scala 2 debugging experience that I believe are feasible to solve on the compiler side. I will post those examples as follow up comments to this issue.
I haven't worked on the compiler backend to date, but I'm willing to learn and help in the process, as well as provide feedback and testing of the implementations. Thanks in advance.