Skip to content

Commit ccc5b36

Browse files
committed
assert that process is unlinked before starting eval
1 parent 0e4a06b commit ccc5b36

File tree

1 file changed

+4
-0
lines changed
  • apps/elixir_ls_debugger/lib/debugger

1 file changed

+4
-0
lines changed

apps/elixir_ls_debugger/lib/debugger/server.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ defmodule ElixirLS.Debugger.Server do
414414
defp evaluate_code_expression(expr, bindings, timeout) do
415415
task =
416416
Task.async(fn ->
417+
receive do
418+
:continue -> :ok
419+
end
417420
try do
418421
{term, _bindings} = Code.eval_string(expr, bindings)
419422
term
@@ -423,6 +426,7 @@ defmodule ElixirLS.Debugger.Server do
423426
end)
424427

425428
Process.unlink(task.pid)
429+
send(task.pid, :continue)
426430

427431
result = Task.yield(task, timeout) || Task.shutdown(task)
428432

0 commit comments

Comments
 (0)