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

Add a fallback if unable to identify module at line in debugger #934

Closed
lukaszsamson opened this issue Jul 7, 2023 · 0 comments · Fixed by #939
Closed

Add a fallback if unable to identify module at line in debugger #934

lukaszsamson opened this issue Jul 7, 2023 · 0 comments · Fixed by #939

Comments

@lukaszsamson
Copy link
Collaborator

To make it more resilient we can fallback to guessing the module via

:code.all_loaded()
|> Enum.filter(fn {atom, _} -> String.starts_with?(Atom.to_string(atom), "Elixir.") end)
|> Enum.group_by(fn
  {module, path} -> Path.expand(to_string(module.module_info(:compile)[:source]))
end, fn {module, _path} -> module end)

Worst case it will return a list of modules and we may set breakpoints in every one of them

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

Successfully merging a pull request may close this issue.

1 participant