TestItems: debugger crashes in vscode

I start the debugger on a @testitem that runs perfectly fine without debugger. Putting in a breakpoint (at some line in the @testset) and then trying to debug causes the debugger to crash:

[ Info: Julia test item process launching
  Activating project at `~/workspace/Actryx/projects/internal/AxActor/src/jl/AxActor`
Main.Testsetups.Setup.Config(5, 5, Float16(1.0))
[ Info: Now waiting for debug session
┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode-oss/extensions/julialang.language-julia-1.174.2-universal/scripts/error_handler.jl:5
ERROR: 
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:44
 [2] run(debug_engine::TestItemServer.DebugAdapter.DebugEngines.DebugEngine)
   @ TestItemServer.DebugAdapter.DebugEngines ~/.vscode-oss/extensions/julialang.language-julia-1.174.2-universal/scripts/packages/TestItemControllers/packages/DebugAdapter/src/DebugEngines.jl:308
 [3] run(debug_session::TestItemServer.DebugAdapter.DebugSession, error_handler::var"#2#3")
   @ TestItemServer.DebugAdapter ~/.vscode-oss/extensions/julialang.language-julia-1.174.2-universal/scripts/packages/TestItemControllers/packages/DebugAdapter/src/packagedef.jl:162
 [4] (::TestItemServer.var"#start_debug_backend##0#start_debug_backend##1"{String, var"#2#3", Channel{Bool}})()
   @ TestItemServer ~/.vscode-oss/extensions/julialang.language-julia-1.174.2-universal/scripts/packages/TestItemControllers/testprocess/TestItemServer/src/TestItemServer.jl:525

Anyone some idea what’s wrong? Thanks.

Can you try with the prerelease version of the extension? You can switch between them in the VS Code extension manager.

@davidanthoff I installed the latest MS VSCode and installed the vscode-julia-extension and enabled Pre-Release version. Test runs fine, but debugger still crashes (with a different error, however):
``` Activating project at ~/workspace/Actryx/projects/internal/AxActor/src/jl/AxActor
Main.Testsetups.Setup.Config(5, 5, Float16(1.0))
[ Info: Now waiting for debug session
┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.219.2/scripts/error_handler.jl:5
ERROR:
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:44
[2] run(debug_engine::TestItemServer.DebugAdapter.DebugEngines.DebugEngine)
@ TestItemServer.DebugAdapter.DebugEngines ~/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/packages/DebugAdapter/src/DebugEngines.jl:308
[3] run(debug_session::TestItemServer.DebugAdapter.DebugSession, error_handler::var"#2#3")
@ TestItemServer.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/packages/DebugAdapter/src/packagedef.jl:162
[4] (::TestItemServer.var"#start_debug_backend##0#start_debug_backend##1"{String, var"#2#3", Channel{Bool}})()
@ TestItemServer ~/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/testprocess/TestItemServer/src/TestItemServer.jl:664

[1013521] signal 15: Terminated
in expression starting at /home/hjansen/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/testprocess/app/testserver_main.jl:17
unknown function (ip: 0x7fc933c98e4f) at /lib/x86_64-linux-gnu/libc.so.6
pthread_cond_wait at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
uv_cond_wait at /workspace/srcdir/libuv/src/unix/thread.c:822
ijl_task_get_next at /cache/build/builder-amdci5-2/julialang/julia-ci/src/scheduler.c:523
poptask at ./task.jl:1216
wait at ./task.jl:1228
task_done_hook at ./task.jl:868
jfptr_task_done_hook_71323.1 at /home/hjansen/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
jl_apply at /cache/build/builder-amdci5-2/julialang/julia-ci/src/julia.h:2394 [inlined]
jl_finish_task at /cache/build/builder-amdci5-2/julialang/julia-ci/src/task.c:342
start_task at /cache/build/builder-amdci5-2/julialang/julia-ci/src/task.c:1264
unknown function (ip: (nil)) at (unknown file)
OPENSSL_LH_flush at /home/hjansen/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/bin/../lib/julia/libcrypto.so.3 (unknown line)
OPENSSL_LH_free at /home/hjansen/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/bin/../lib/julia/libcrypto.so.3 (unknown line)
err_cleanup at /home/hjansen/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/bin/../lib/julia/libcrypto.so.3 (unknown line)
OPENSSL_cleanup at /home/hjansen/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/bin/../lib/julia/libcrypto.so.3 (unknown line)
unknown function (ip: 0x7fc933c47a75) at /lib/x86_64-linux-gnu/libc.so.6
exit at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
ijl_exit at /cache/build/builder-amdci5-2/julialang/julia-ci/src/init.c:197
jlplt_ijl_exit_46827.1 at /home/hjansen/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
exit at ./initdefs.jl:28
#global_err_handler#4 at /home/hjansen/.vscode/extensions/julialang.language-julia-1.219.2/scripts/error_handler.jl:67
global_err_handler at /home/hjansen/.vscode/extensions/julialang.language-julia-1.219.2/scripts/error_handler.jl:4
unknown function (ip: 0x7fc919bd2c92) at (unknown file)
jl_apply at /cache/build/builder-amdci5-2/julialang/julia-ci/src/julia.h:2394 [inlined]
jl_f_invokelatest at /cache/build/builder-amdci5-2/julialang/julia-ci/src/builtins.c:881
#2 at /home/hjansen/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/testprocess/app/testserver_main.jl:32 [inlined]
run at /home/hjansen/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/packages/DebugAdapter/src/packagedef.jl:179
#start_debug_backend##0 at /home/hjansen/.vscode/extensions/julialang.language-julia-1.219.2/scripts/packages/TestItemControllers/testprocess/TestItemServer/src/TestItemServer.jl:664
unknown function (ip: 0x7fc919b2494f) at (unknown file)
jl_apply at /cache/build/builder-amdci5-2/julialang/julia-ci/src/julia.h:2394 [inlined]
start_task at /cache/build/builder-amdci5-2/julialang/julia-ci/src/task.c:1253
unknown function (ip: (nil)) at (unknown file)
Allocations: 20311709 (Pool: 20309410; Big: 2299); GC: 11

...?

I finally tried with a locally compiled version of Julia (1.12-DEV),
however without success: debugger still crashing:

[ Info: Julia test item process launching
Precompiling packages…
31535.0 ms ✓ TestItemServer
1 dependency successfully precompiled in 32 seconds. 33 already precompiled.
5 dependencies precompiled but different versions are currently loaded (Base64, InteractiveUtils, JuliaSyntaxHighlighting, Markdown and StyledStrings). Restart julia to access the new versions. Otherwise, 5 dependents of these packages may trigger further precompilation to work with the unexpected versions.
Activating project at /tmp/jl_XIXJIy
Precompiling packages…
380.8 ms ✓ TestItems
1804.4 ms ✓ OrderedCollections
3396.3 ms ✓ MacroTools
886.8 ms ✓ Match
5155.6 ms ✓ AxActor
17092.8 ms ✓ TestItemRunner
6 dependencies successfully precompiled in 17 seconds. 29 already precompiled.
28 dependencies precompiled but different versions are currently loaded (ArgTools, Base64, Dates, Downloads, InteractiveUtils, JuliaSyntaxHighlighting, LibCURL, LibCURL_jll, LibGit2, LibGit2_jll, LibSSH2_jll, Logging, Markdown, MozillaCACerts_jll, NetworkOptions, OpenSSL_jll, Pkg, Printf, Serialization, StyledStrings, TOML, Tar, Test, UUIDs, Unicode, Zlib_jll, nghttp2_jll and p7zip_jll). Restart julia to access the new versions. Otherwise, 2 dependents of these packages may trigger further precompilation to work with the unexpected versions.
Main.Testsetups.Setup.Config(5, 5, Float16(1.0))
[ Info: Now waiting for debug session
┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.231.1/scripts/error_handler.jl:5
ERROR:
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:44
[2] run(debug_engine::TestItemServer.DebugAdapter.DebugEngines.DebugEngine)
@ TestItemServer.DebugAdapter.DebugEngines ~/.vscode/extensions/julialang.language-julia-1.231.1/scripts/packages/TestItemControllers/packages/DebugAdapter/src/DebugEngines.jl:308
[3] run(debug_session::TestItemServer.DebugAdapter.DebugSession, error_handler::var"#2#3")
@ TestItemServer.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.231.1/scripts/packages/TestItemControllers/packages/DebugAdapter/src/packagedef.jl:162
[4] (::TestItemServer.var"#start_debug_backend##0#start_debug_backend##1"{String, var"#2#3", Channel{Bool}})()
@ TestItemServer ~/.vscode/extensions/julialang.language-julia-1.231.1/scripts/packages/TestItemControllers/testprocess/TestItemServer/src/TestItemServer.jl:657

... ?

@davidanthoff Progress: I can debug now with setup=[SetupMod] but not with setup=[SetupMod,SetupSnippet]. Works for me for now.