1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

debugger on autoCallFunction error

This commit is contained in:
Ben Burdette 2021-05-03 14:37:33 -06:00
parent f32c687f03
commit 2dd61411af
2 changed files with 30 additions and 10 deletions

View file

@ -79,24 +79,28 @@ ref<EvalState> EvalCommand::getEvalState()
return ref<EvalState>(evalState);
}
*/
EvalCommand::EvalCommand()
{
addFlag({
.longName = "debugger",
.description = "start an interactive environment if evaluation fails",
.handler = {&startReplOnEvalErrors, true},
});
}
// ref<EvalState> EvalCommand::getEvalState()
// {
// if (!evalState)
// evalState = std::make_shared<EvalState>(searchPath, getStore());
// return ref<EvalState>(evalState);
// }
EvalCommand::EvalCommand()
{
// std::cout << "EvalCommand::EvalCommand()" << std::endl;
addFlag({
.longName = "debugger",
.description = "start an interactive environment if evaluation fails",
.handler = {&startReplOnEvalErrors, true},
});
}
extern std::function<void(const Error & error, const std::map<std::string, Value *> & env)> debuggerHook;
ref<EvalState> EvalCommand::getEvalState()
{
std::cout << " EvalCommand::getEvalState()" << startReplOnEvalErrors << std::endl;
if (!evalState) {
evalState = std::make_shared<EvalState>(searchPath, getStore());
if (startReplOnEvalErrors)