MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / ListLocalVariables

Method ListLocalVariables

src/server/angelscript/add_on/debugger/debugger.cpp:682–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682void CDebugger::ListLocalVariables(asIScriptContext *ctx)
683{
684 if( ctx == 0 )
685 {
686 Output("No script is running\n");
687 return;
688 }
689
690 asIScriptFunction *func = ctx->GetFunction();
691 if( !func ) return;
692
693 stringstream s;
694 for( asUINT n = 0; n < func->GetVarCount(); n++ )
695 {
696 if( ctx->IsVarInScope(n) )
697 {
698 // TODO: Allow user to set if members should be expanded or not
699 // Expand members by default to 3 recursive levels only
700 s << func->GetVarDecl(n) << " = " << ToString(ctx->GetAddressOfVar(n), ctx->GetVarTypeId(n), 3, ctx->GetEngine()) << endl;
701 }
702 }
703 Output(s.str());
704}
705
706void CDebugger::ListGlobalVariables(asIScriptContext *ctx)
707{

Callers

nothing calls this directly

Calls 7

IsVarInScopeMethod · 0.80
GetVarDeclMethod · 0.80
GetAddressOfVarMethod · 0.80
GetVarTypeIdMethod · 0.80
GetFunctionMethod · 0.45
GetVarCountMethod · 0.45
GetEngineMethod · 0.45

Tested by

no test coverage detected