mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 06:22:42 +01:00
Expose locals from let expressions to the debugger
This commit is contained in:
parent
081dc5daa1
commit
36dfac7560
2 changed files with 16 additions and 6 deletions
|
|
@ -1322,6 +1322,19 @@ void ExprLet::eval(EvalState & state, Env & env, Value & v)
|
|||
for (auto & i : attrs->attrs)
|
||||
env2.values[displ++] = i.second.e->maybeThunk(state, i.second.inherited ? env : env2);
|
||||
|
||||
auto dts = state.debugRepl
|
||||
? makeDebugTraceStacker(
|
||||
state,
|
||||
*this,
|
||||
env2,
|
||||
getPos()
|
||||
? std::make_shared<Pos>(state.positions[getPos()])
|
||||
: nullptr,
|
||||
"while evaluating a '%1%' expression",
|
||||
"let"
|
||||
)
|
||||
: nullptr;
|
||||
|
||||
body->eval(state, env2, v);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue