Debug only running once in VSCode

When I use @run at the VSCode Julia REPL to start a debug session it works fine the first time it is called. But every subsequent time it just spins and the debug session never gets started. I have to kill the REPL and make a new terminal to get it to start again.

This started happening a while ago. How can I fix it?

If I ctrl-C the @run I get this stack trace:

julia> @run make_function([f],[d])
^C
ERROR: InterruptException:
Stacktrace:
 [1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
   @ Base .\task.jl:945
 [2] wait()
   @ Base .\task.jl:1009
 [3] wait(c::Base.GenericCondition{ReentrantLock}; first::Bool)
   @ Base .\condition.jl:130
 [4] wait
   @ .\condition.jl:125 [inlined]
 [5] take_buffered(c::Channel{VSCodeServer.DebugAdapter.DebugSession})
   @ Base .\channels.jl:477
 [6] take!(c::Channel{VSCodeServer.DebugAdapter.DebugSession})
   @ Base .\channels.jl:471
 [7] macro expansion
   @ c:\Users\seatt\.vscode\extensions\julialang.language-julia-1.123.2\scripts\packages\VSCodeServer\src\debugger.jl:106 [inlined]
 [8] top-level scope
   @ REPL[10]:1

julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b36 (2024-08-27 14:19 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 16 default, 0 interactive, 8 GC (on 32 virtual cores)
Environment:
JULIA_EDITOR = code.cmd
JULIA_NUM_THREADS = 16

vscode julia extension is v1.123.2

1 Like