# VSCode debug crash with 1.10.2

**URL:** <https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501>\
**Category:** VS Code\
**Tags:** crash\
**Created:** [March 12, 2024, 5:47am UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501 "2024-03-12T05:47:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaojin](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chaojin](https://discourse.julialang.org/u/chaojin)\
**Post date:** [March 12, 2024, 5:47am UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501/1 "2024-03-12T05:47:10Z")

</div>

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

```julia
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

```julia
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.

```julia
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.

---

<div class="post-metadata">

**Author:** ![stprior](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stprior/32/50821_2.png) [@stprior](https://discourse.julialang.org/u/stprior)\
**Post date:** [March 15, 2024, 12:33am UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501/2 "2024-03-15T00:33:17Z")

</div>

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](https://github.com/julia-vscode/julia-vscode/issues/3558) mentions the same exception in the comments but it looks like a separate issue. I’ll ask there if they want it logged seperately.

---

<div class="post-metadata">

**Author:** ![bpleao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bpleao/32/208144_2.png) [@bpleao](https://discourse.julialang.org/u/bpleao)\
**Post date:** [March 29, 2024, 9:52pm UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501/3 "2024-03-29T21:52:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chaojin](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chaojin](https://discourse.julialang.org/u/chaojin)\
**Post date:** [April 30, 2024, 10:01pm UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501/4 "2024-04-30T22:01:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [May 1, 2024, 12:55am UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501/5 "2024-05-01T00:55:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [May 1, 2024, 6:35am UTC](https://discourse.julialang.org/t/vscode-debug-crash-with-1-10-2/111501/6 "2024-05-01T06:35:35Z")

</div>

Yesterday, see [Julia v1.10.3 has been released](https://discourse.julialang.org/t/julia-v1-10-3-has-been-released/113667)
