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

Automatically infer build target based on breakpoint information #281

Open
tgodzik opened this issue Jul 14, 2022 · 1 comment
Open

Automatically infer build target based on breakpoint information #281

tgodzik opened this issue Jul 14, 2022 · 1 comment

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Jul 14, 2022

Is your feature request related to a problem? Please describe.

Currently, when user wants to attach to a process they need to specify the exact build target to use, which might sometimes not be easy with a project with a lot of modules.

Describe the solution you'd like

However, we can use onDidChangeBreakpoints to listen to set breakpoints and send that data to metals server, which can be later used as an advanced discovery mechanism. Find the top targets that correspond to all sources with breakpoints, or if we ware unable to choose, show quick pick for the user to choose from.

This is just an idea for now and

Describe alternatives you've considered

Always showing all targets if user didn't specify them or base the possible targets on the currently focused file

Additional contex

No response

Search terms

attach debug scala dap

@adpi2
Copy link
Member

adpi2 commented Jul 14, 2022

Indeed it would be super cool for the user to not have to specify a build target. But I am not convinced by the accuracy of using breakpoints because I often forget old breakpoints that could be unrelated to the process I want to debug.

As an alternative we could use JMX (or JDI) to get the classpath of the process and then find the build target with the best overlapping classpath.

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

No branches or pull requests

2 participants