| 1087 | } |
| 1088 | |
| 1089 | ResultCode ContextDebugger::GetVariablesInContext(DebuggerGetVariablesRequest const& req) |
| 1090 | { |
| 1091 | LuaVirtualPin lua(GetExtensionState()); |
| 1092 | if (!lua) { |
| 1093 | return ResultCode::EvalEngineNotReady; |
| 1094 | } |
| 1095 | |
| 1096 | auto L = lua->GetState(); |
| 1097 | DebugEvalGuard _G(*this); |
| 1098 | StackCheck _(L); |
| 1099 | StaticLifetimeStackPin _LT(lua->GetState(), lua::LifetimeHandle{}); |
| 1100 | lua::ProfilerStackGuard _p(&*lua); |
| 1101 | |
| 1102 | ContextDebuggerGetVarCtx ctx{ this, &req, ResultCode::Success }; |
| 1103 | char const* error; |
| 1104 | if (ProtectedRunC(lua->GetState(), &ContextDebuggerGetVar, &ctx, error)) { |
| 1105 | return ctx.Result; |
| 1106 | } else { |
| 1107 | ctx.Request->Response->set_error_message(error); |
| 1108 | return ResultCode::EvalFailed; |
| 1109 | } |
| 1110 | } |
| 1111 | |
| 1112 | ResultCode ContextDebugger::GetVariablesInLocal(lua_State* L, DebuggerGetVariablesRequest const& req) |
| 1113 | { |
no test coverage detected