Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Dec 18, 2023
1 parent e2b11c5 commit 646dac7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
25 changes: 15 additions & 10 deletions apps/debug_adapter/lib/debug_adapter/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1101,15 +1101,16 @@ defmodule ElixirLS.DebugAdapter.Server do
"expensive" => false
}

args_scope = if frame.args != :undefined do
%{
"name" => "arguments",
"variablesReference" => args_id,
"namedVariables" => 0,
"indexedVariables" => Enum.count(frame.args),
"expensive" => false
}
end
args_scope =
if frame.args != :undefined do
%{
"name" => "arguments",
"variablesReference" => args_id,
"namedVariables" => 0,
"indexedVariables" => Enum.count(frame.args),
"expensive" => false
}
end

messages_scope = %{
"name" => "messages",
Expand All @@ -1129,7 +1130,11 @@ defmodule ElixirLS.DebugAdapter.Server do

scopes =
[vars_scope, versioned_vars_scope, process_info_scope]
|> Kernel.++(if frame.args != :undefined and Enum.count(frame.args) > 0, do: [args_scope], else: [])
|> Kernel.++(
if frame.args != :undefined and Enum.count(frame.args) > 0,
do: [args_scope],
else: []
)
|> Kernel.++(if Enum.count(frame.messages) > 0, do: [messages_scope], else: [])

{state, scopes}
Expand Down
6 changes: 2 additions & 4 deletions apps/debug_adapter/test/debugger_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2322,8 +2322,7 @@ defmodule ElixirLS.DebugAdapter.ServerTest do
assert Proto in :int.interpreted()

assert [
{{Proto, 2},
[:active, :enable, :null, {BreakpointCondition, :check_0}]}
{{Proto, 2}, [:active, :enable, :null, {BreakpointCondition, :check_0}]}
] = :int.all_breaks(Proto)

assert %{{Proto, :go, 1} => [2]} = :sys.get_state(server).function_breakpoints
Expand Down Expand Up @@ -2434,8 +2433,7 @@ defmodule ElixirLS.DebugAdapter.ServerTest do
assert Proto.List in :int.interpreted()

assert [
{{Proto.List, 7},
[:active, :enable, :null, {BreakpointCondition, :check_0}]}
{{Proto.List, 7}, [:active, :enable, :null, {BreakpointCondition, :check_0}]}
] = :int.all_breaks(Proto.List)

assert %{{Proto.List, :go, 1} => [7]} = :sys.get_state(server).function_breakpoints
Expand Down

0 comments on commit 646dac7

Please sign in to comment.