Skip to content

Commit 32acb7b

Browse files
authored
Merge pull request #1211 from elixir-lsp/codex/replace-map.fetch-with-safe-lookup
Fix remote PID handling
2 parents b70cd8b + 33119de commit 32acb7b

File tree

1 file changed

+4
-1
lines changed
  • apps/debug_adapter/lib/debug_adapter

1 file changed

+4
-1
lines changed

apps/debug_adapter/lib/debug_adapter/server.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2942,7 +2942,10 @@ defmodule ElixirLS.DebugAdapter.Server do
29422942
rescue
29432943
ArgumentError ->
29442944
# remote process
2945-
process_name_from_snapshot(Map.fetch!(snapshot_by_pid, pid))
2945+
case Map.get(snapshot_by_pid, pid) do
2946+
nil -> nil
2947+
snapshot -> process_name_from_snapshot(snapshot)
2948+
end
29462949
else
29472950
nil -> nil
29482951
process_info -> process_name_from_info(process_info)

0 commit comments

Comments
 (0)