From 24fe2795b6e43261b80030e822bec535cc21daee Mon Sep 17 00:00:00 2001 From: Sebastian Pfitzner Date: Wed, 15 Jul 2026 22:19:16 +0000 Subject: [PATCH] fix: support JuliaInterpreter 0.11 Extend the compat bound to allow JuliaInterpreter 0.11 and stop reading the `codelocs` field of `CodeInfo`, which was removed in Julia 1.12. `calls_on_line` and `calls_in_frame` now bound their pc iteration with `length(src.code)`, which is equivalent (one entry per statement) and available on all supported Julia versions. Co-Authored-By: Claude Opus 4.8 --- Project.toml | 2 +- src/debugger_utils.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index e52008f..aa2501c 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] JSON = "0.20, 0.21" julia = "1" -JuliaInterpreter = "0.8.5, 0.9, 0.10" +JuliaInterpreter = "0.8.5, 0.9, 0.10, 0.11" [targets] test = ["Test", "TestItemRunner"] diff --git a/src/debugger_utils.jl b/src/debugger_utils.jl index 6c135e6..e3f3c0d 100644 --- a/src/debugger_utils.jl +++ b/src/debugger_utils.jl @@ -27,7 +27,7 @@ function calls_on_line(frame::JuliaInterpreter.Frame, line=nothing) src = frame.framecode.src exprs = [] - for pc in frame.pc:length(src.codelocs) + for pc in frame.pc:length(src.code) loc = JuliaInterpreter.whereis(frame, pc) if loc === nothing || loc[2] > line @@ -85,7 +85,7 @@ calls_in_frame(state) = calls_in_frame(state.debug_engine.frame) calls_in_frame(::Nothing) = [] function calls_in_frame(frame::JuliaInterpreter.Frame) exprs = [] - for pc in frame.pc:length(frame.framecode.src.codelocs) + for pc in frame.pc:length(frame.framecode.src.code) expr = JuliaInterpreter.pc_expr(frame, pc) if Meta.isexpr(expr, :call) push!(exprs, (pc = pc, expr = expr))