Skip to content

Commit 5328ab7

Browse files
committed
allow accessing the JuliaInterpreter frame with a sentinel
1 parent e935b83 commit 5328ab7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/repl.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ function eval_code(frame::Frame, command::AbstractString)
183183
vars = filter(v -> v.name != Symbol(""), JuliaInterpreter.locals(frame))
184184
res = gensym()
185185
eval_expr = Expr(:let,
186-
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...),
186+
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...,
187+
Expr(:(=), :__FRAME__ , frame)),
187188
Expr(:block,
188189
Expr(:(=), res, expr),
189190
Expr(:tuple, res, Expr(:tuple, [v.name for v in vars]...))

src/watch.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ function show_watch_list(io, state::DebuggerState)
1616
for (i, expr) in enumerate(state.watch_list)
1717
vars = filter(v -> v.name != Symbol(""), JuliaInterpreter.locals(frame))
1818
eval_expr = Expr(:let,
19-
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...),
19+
Expr(:block, map(x->Expr(:(=), x...), [(v.name, maybe_quote(v.value)) for v in vars])...,
20+
Expr(:(=), :__FRAME__ , frame)),
2021
expr)
2122
errored = false
2223
res = try

0 commit comments

Comments
 (0)