diff options
author | Ben Burdette <bburdette@gmail.com> | 2021-05-03 14:37:33 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2021-05-03 14:37:33 -0600 |
commit | 2dd61411af903e374566e0cf5d06257ad240662e (patch) | |
tree | 0623970ff04c8e71f1a83283be4e8f724e031e05 /src/libcmd | |
parent | f32c687f03e9764e55831d894b719fdf0104cf25 (diff) |
debugger on autoCallFunction error
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/command.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index d790bb51d..51a071d25 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -79,24 +79,28 @@ ref<EvalState> EvalCommand::getEvalState() return ref<EvalState>(evalState); } */ +// 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}, }); } -// ref<EvalState> EvalCommand::getEvalState() -// { -// if (!evalState) -// evalState = std::make_shared<EvalState>(searchPath, getStore()); -// return ref<EvalState>(evalState); -// } 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) |