Skip to content

Commit

Permalink
feat: display metatable for fenv
Browse files Browse the repository at this point in the history
  • Loading branch information
sssooonnnggg committed Jan 3, 2025
1 parent 8c39c3d commit 667f6d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debugger/src/internal/scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
#include <string>
#include <string_view>
#include <type_traits>
#include "utils/dap_utils.h"

#include <lapi.h>
#include <lstate.h>
#include <lua.h>

#include <internal/utils/dap_utils.h>

namespace luau::debugger {

enum class ScopeType {
Expand Down
4 changes: 4 additions & 0 deletions debugger/src/internal/variable_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ void VariableRegistry::fetchGlobals(lua_State* L) {
globals.emplace_back(createVariable(L, name, -1));
lua_pop(L, 1);
}

if (lua_getmetatable(L, -1))
globals.emplace_back(createVariable(L, "__metatable", -1));

registerOrUpdateVariables(getGlobalScope(), std::move(globals));
}

Expand Down

0 comments on commit 667f6d6

Please sign in to comment.