VSCode debug crash with 1.10.2

HI,

I just upgrade to 1.10.2 and hit crash which is more like VSCode tools crash when I run nd debug my old code. To rule out my code error, I just create a simple test.jl like below

println("This is test1")
println("This is test2")
println("This is test3")
  • If I run this code in VSCode, or run in Julia REPL, it can run and output correctly.
  • If I set breakpoint at the first line, run debug in VSCode, when it break there, and click “continue” , it can run correctly.
  • If I set breakpoint at he first line, when it break there, and click “step over”, it has below crash
This is test1
┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.75.2/scripts/error_handler.jl:15
ERROR: MethodError: no method matching getindex(::Nothing, ::Int64)
Stacktrace:
 [1] stack_trace_request(conn::VSCodeDebugger.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, state::VSCodeDebugger.DebugAdapter.DebuggerState, params::VSCodeDebugger.DebugAdapter.StackTraceArguments)
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.75.2/scripts/packages/DebugAdapter/src/debugger_requests.jl:403
 [2] (::VSCodeDebugger.DebugAdapter.var"#128#154"{VSCodeDebugger.DebugAdapter.DebuggerState})(conn::VSCodeDebugger.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::VSCodeDebugger.DebugAdapter.StackTraceArguments)
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.75.2/scripts/packages/DebugAdapter/src/packagedef.jl:55
 [3] dispatch_msg(x::VSCodeDebugger.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeDebugger.JSONRPC.MsgDispatcher, msg::Dict{String, Any})
   @ VSCodeDebugger.JSONRPC ~/.vscode/extensions/julialang.language-julia-1.75.2/scripts/packages/JSONRPC/src/typed.jl:67
 [4] (::VSCodeDebugger.DebugAdapter.var"#146#172"{VSCodeDebugger.var"#3#4"{Tuple{String, String}}, VSCodeDebugger.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, VSCodeDebugger.JSONRPC.MsgDispatcher})()
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.75.2/scripts/packages/DebugAdapter/src/packagedef.jl:76

 *  The terminal process "julia '--color=yes', '--startup-file=no', '--history-file=no', '--project=/Users/chaojin/my_app/julia', '/Users/chaojin/.vscode/extensions/julialang.language-julia-1.75.2/scripts/debugger/run_debugger.jl', '/var/folders/bk/jf5jzfj178lfq0171j14kpn40000gn/T/vsc-jl-dbg-9b39bc37-bea3-45d1-b51f-cbb86b5763e0', '/var/folders/bk/jf5jzfj178lfq0171j14kpn40000gn/T/vsc-jl-cr-1bb4f8aa-7f01-4ed4-8c15-bfb3af54f99a'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Then I tried to modify as below with function, it can step run but has the same crash when return from function.

function test()
    println("This is test1")
    println("This is test2")
    println("This is test3")
end
test()

I degrade to 1.10.1. Then everything is OK.

my environment:
MacBook Pro M1 Pro,
OS Sonama 14.4
VSCode: 1.87.1
Julia extension: v1.75.2

Thanks.

2 Likes

I’m getting the same with
Ubuntu 22.04.3 LTS
VSCode 1.87.2
Julia Extension 1.75.2

Debugger crashes with AssertionError: !(is_generated(method)) · Issue #3558 · julia-vscode/julia-vscode · GitHub mentions the same exception in the comments but it looks like a separate issue. I’ll ask there if they want it logged seperately.

Same here with:
Ubuntu 22.04.4 LTS
Julia 1.10.2
VSCode 1.87.2
julia-vscode 1.75.2

The same fix reported by @chaojin (degrading to Julia 1.10.1) worked for me.

Just test with Julia 1.10.3 and julia-vscode 1.76.2, this crash has been solved.

1 Like

I have never heard of Julia 1.10.3
When was it released?

Yesterday, see Julia v1.10.3 has been released