Skip to content

Commit 4c88d90

Browse files
committed
update(callstack): Provide arguments
1 parent d3874af commit 4c88d90

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/scripting/core.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ void SetupScriptingEnvironment(PluginObject plugin, EContext* ctx)
7272

7373
ADD_FUNCTION("OnFunctionContextRegister", [](FunctionContext* context) -> void {
7474
std::string function_call = replace(context->GetFunctionKey(), " ", "::");
75+
std::vector<std::string> arguments;
76+
for (int i = 0; i < context->GetArgumentsCount(); i++)
77+
arguments.push_back(context->GetArgumentAsString(i));
78+
function_call += "(" + implode(arguments, ", ") + ")";
79+
7580
context->temporaryData.push_back(g_callStack.RegisterPluginCallstack(FetchPluginName(context->GetPluginContext()), function_call));
7681
g_ResourceMonitor.StartTime("core", replace(context->GetFunctionKey(), " ", "::"));
7782
});

0 commit comments

Comments
 (0)