File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -1671,13 +1671,17 @@ defmodule ElixirLS.Debugger.Server do
1671
1671
1672
1672
defp interpret_module ( mod ) do
1673
1673
try do
1674
- { :module , _ } = interpret ( mod )
1675
- ModuleInfoCache . store ( mod )
1674
+ case interpret ( mod ) do
1675
+ { :module , _ } -> :ok
1676
+ { :error , :excluded } -> :ok
1677
+ end
1676
1678
catch
1677
- _ , _ ->
1679
+ _kind , _error ->
1678
1680
Output . debugger_important (
1679
1681
"Module #{ inspect ( mod ) } cannot be interpreted. Consider adding it to `excludeModules`."
1680
1682
)
1683
+ after
1684
+ ModuleInfoCache . store ( mod )
1681
1685
end
1682
1686
end
1683
1687
@@ -1856,7 +1860,7 @@ defmodule ElixirLS.Debugger.Server do
1856
1860
defp interpret ( module , print_message? \\ true )
1857
1861
1858
1862
defp interpret ( module , _print_message? ) when module in @ exclude_protocols_from_interpreting do
1859
- :error
1863
+ { :error , :excluded }
1860
1864
end
1861
1865
1862
1866
defp interpret ( module , print_message? ) do
@@ -1867,7 +1871,7 @@ defmodule ElixirLS.Debugger.Server do
1867
1871
if Enum . any? ( @ exclude_implementations_from_interpreting , & ( & 1 in module_behaviours ) ) do
1868
1872
# debugger uses Inspect protocol and setting breakpoints in implementations leads to deadlocks
1869
1873
# https://github.com/elixir-lsp/elixir-ls/issues/903
1870
- :error
1874
+ { :error , :excluded }
1871
1875
else
1872
1876
if print_message? do
1873
1877
Output . debugger_console ( "Interpreting module #{ inspect ( module ) } " )
@@ -1876,7 +1880,7 @@ defmodule ElixirLS.Debugger.Server do
1876
1880
:int . ni ( module )
1877
1881
end
1878
1882
else
1879
- :error
1883
+ { :error , :cannot_load }
1880
1884
end
1881
1885
end
1882
1886
Original file line number Diff line number Diff line change @@ -2956,7 +2956,9 @@ defmodule ElixirLS.Debugger.ServerTest do
2956
2956
end )
2957
2957
end
2958
2958
2959
- test "evaluate expression with OK result - progress reporting not supported" , % { server: server } do
2959
+ test "evaluate expression with OK result - progress reporting not supported" , % {
2960
+ server: server
2961
+ } do
2960
2962
in_fixture ( __DIR__ , "mix_project" , fn ->
2961
2963
Server . receive_packet ( server , initialize_req ( 1 , % { } ) )
2962
2964
assert_receive ( response ( _ , 1 , "initialize" , _ ) )
You can’t perform that action at this time.
0 commit comments