File tree Expand file tree Collapse file tree 1 file changed +24
-8
lines changed
apps/elixir_ls_debugger/lib/debugger Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -2187,15 +2187,31 @@ defmodule ElixirLS.Debugger.Server do
2187
2187
Output . debugger_console ( "Interpreting module #{ inspect ( module ) } " )
2188
2188
end
2189
2189
2190
- case :int . ni ( module ) do
2191
- :error ->
2192
- { :error , :cannot_interpret }
2190
+ try do
2191
+ case :int . ni ( module ) do
2192
+ :error ->
2193
+ { :error , :cannot_interpret }
2194
+
2195
+ { :module , _ } ->
2196
+ # calling module_info when paused on a breakpoint can deadlock the debugger
2197
+ # cache it for each interpreted module
2198
+ ModuleInfoCache . store ( module )
2199
+ :ok
2200
+ end
2201
+ catch
2202
+ kind , error ->
2203
+ # :int.ni can raise
2204
+ # ** (MatchError) no match of right hand side value: {:error, :on_load_failure}
2205
+ # (debugger 5.3) int.erl:531: anonymous fn_3 in :int.load_2
2206
+ # (debugger 5.3) int.erl:527: :int.load_2
2207
+ { payload , stacktrace } = Exception . blame ( kind , error , __STACKTRACE__ )
2208
+ message = Exception . format ( kind , payload , stacktrace )
2193
2209
2194
- { :module , _ } ->
2195
- # calling module_info when paused on a breakpoint can deadlock the debugger
2196
- # cache it for each interpreted module
2197
- ModuleInfoCache . store ( module )
2198
- :ok
2210
+ Output . debugger_console (
2211
+ "Error during interpreting module #{ inspect ( module ) } : #{ message } "
2212
+ )
2213
+
2214
+ { :error , :cannot_interpret }
2199
2215
end
2200
2216
end
2201
2217
else
You can’t perform that action at this time.
0 commit comments