MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / GetStackLevel

Method GetStackLevel

emmy_debugger/src/debugger/emmy_debugger.cpp:853–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

851}
852
853int Debugger::GetStackLevel(bool skipC) const {
854 if (!currentL) {
855 return 0;
856 }
857
858 auto L = currentL;
859
860 int level = 0, i = 0;
861 lua_Debug ar{};
862 while (lua_getstack(L, i, &ar)) {
863 lua_getinfo(L, "l", &ar);
864 if (getDebugCurrentLine(&ar) >= 0 || !skipC)
865 level++;
866 i++;
867 }
868 return level;
869}
870
871void Debugger::AsyncDoString(const std::string &code) {
872 doStringList.emplace_back(code);

Callers 2

StartMethod · 0.80
UpdateStackLevelMethod · 0.80

Calls 3

lua_getstackFunction · 0.50
lua_getinfoFunction · 0.50
getDebugCurrentLineFunction · 0.50

Tested by

no test coverage detected