Cannot place debugger breakpoint on an assignment
Debugging currently does not work, most likely due to an ElixirSense change. This gist has some details:
https://gist.github.com/Ajwah/4dee98bbb1e0c9257bb52dcd6c6802e2#file-gistfile1-txt
The error Could not determine module at line is received when debugging.
It's seems likely that this broke from the ElixirSense update in https://github.com/elixir-lsp/elixir-ls/pull/202
Placing a debugger breakpoint on an assignment currently results in the breakpoint not being hit and the message "Could not determine module at line" being returned. I've unpinned this issue because it's impact radius is not as far-reaching as I initially thought.
The code from the gist is no longer accessible.
With recent changes in elixir_sense this should not be a problem anymore. 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