Hello,
I understand that the Julia debugging experience in VS Code is still under development, but I was never able to get the debugger to work even for the “Hello World” script set as the example on VS Code’s page. When I follow the example here, I create the file
print("Hello!")
and hit F5
without setting a breakpoint, the result is
Activating project at `~/.julia/environments/v1.11`
Hello!┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/error_handler.jl:15
ERROR: type Nothing has no field frame
Stacktrace:
* Terminal will be reused by tasks, press any key to close it.
If I set a breakpoint in the only line of code and hit F5
, the result is
Activating project at `~/.julia/environments/v1.11`
┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/error_handler.jl:15
ERROR: TypeError: non-boolean (Missing) used in boolean context
Stacktrace:
[1] evaluate_request(debug_session::VSCodeDebugger.DebugAdapter.DebugSession, params::VSCodeDebugger.DebugAdapter.EvaluateArguments)
@ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/debugger_requests.jl:923
[2] (::VSCodeDebugger.DebugAdapter.var"#119#148"{VSCodeDebugger.DebugAdapter.DebugSession})(params::VSCodeDebugger.DebugAdapter.EvaluateArguments)
@ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/packagedef.jl:82
[3] dispatch_msg(x::VSCodeDebugger.DebugAdapter.DAPRPC.DAPEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeDebugger.DebugAdapter.DAPRPC.MsgDispatcher, msg::Dict{String, Any})
@ VSCodeDebugger.DebugAdapter.DAPRPC ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/DAPRPC/typed.jl:89
[4] (::VSCodeDebugger.DebugAdapter.var"#132#161"{Dict{String, Any}, VSCodeDebugger.var"#3#4"{String}, VSCodeDebugger.DebugAdapter.DAPRPC.MsgDispatcher, VSCodeDebugger.DebugAdapter.DAPRPC.DAPEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}})()
@ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/packagedef.jl:98
* The terminal process "julia '--color=yes', '--startup-file=no', '--history-file=no', '/Users/caetano/.vscode/extensions/julialang.language-julia-1.129.1/scripts/debugger/run_debugger.jl', '/var/folders/xl/g_zr4nmn7hs7j9r988d9_fj80000gn/T/vsc-jl-dbg-a82cfb2e-a940-48eb-9c2f-52fe34c5f13c', '/var/folders/xl/g_zr4nmn7hs7j9r988d9_fj80000gn/T/vsc-jl-dbg-d0b95e9c-3876-4b99-a727-36bf02264bfb', '/var/folders/xl/g_zr4nmn7hs7j9r988d9_fj80000gn/T/vsc-jl-cr-165b3af1-009d-4724-9f63-bf419dd458b7'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
This has always been the behavior since the first time I tried the Julia debugger in VS Code. I created an issue on GitHub a couple of years ago but never got a reply (it’s still open). I’m on MacOS Sonoma (14.7.2 (23H311)) using the latest version of VS Code (see below), Julia version 1.11.2
, and this example was made with the pre-release of julialang.language-julia
Version 1.129.1
Last Updated 2024-12-21, 08:54:29. However, note that the behavior is the same with the current release version 1.127.2
.
Version: 1.96.2 (Universal)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0
I’ll happily provide more information if it helps solve the issue.