Skip to content

Commit

Permalink
fix debugger crash when only 1 frame returned
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Mar 24, 2024
1 parent 2fd52cc commit 3e71900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/debug_adapter/lib/debug_adapter/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@ defmodule ElixirLS.DebugAdapter.Server do

[first_frame | stacktrace]

[] ->
_ ->
# no stacktrace if we are running in non interpreted mode
# or only 1 frame with module: :undefined, function: {:undefined, :undefined}, args: :undefined
# build frames from Process.info stacktrace
# drop first entry as we get it from env
[_ | stacktrace_rest] = prune_stacktrace(stacktrace)
Expand Down

0 comments on commit 3e71900

Please sign in to comment.