Skip to content

Commit 5497513

Browse files
Warn on not interpretable modules (#283)
* warn on not interpretable modules * Update formatting of apps/elixir_ls_debugger/lib/debugger/server.ex Co-authored-by: Jason Axelson <axelson@users.noreply.github.com>
1 parent b21a12e commit 5497513

File tree

1 file changed

+10
-1
lines changed
  • apps/elixir_ls_debugger/lib/debugger

1 file changed

+10
-1
lines changed

apps/elixir_ls_debugger/lib/debugger/server.ex

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,16 @@ defmodule ElixirLS.Debugger.Server do
528528
|> Path.wildcard()
529529
|> Enum.map(&(Path.basename(&1, ".beam") |> String.to_atom()))
530530
|> Enum.filter(&interpretable?(&1, exclude_modules))
531-
|> Enum.map(&:int.ni(&1))
531+
|> Enum.map(fn mod ->
532+
try do
533+
:int.ni(mod)
534+
catch
535+
_, _ ->
536+
IO.warn(
537+
"Module #{inspect(mod)} cannot be interpreted. Consider adding it to `excludeModules`."
538+
)
539+
end
540+
end)
532541
end
533542

534543
defp interpretable?(module, exclude_modules) do

0 commit comments

Comments
 (0)