Skip to content

EntropyEngine::Core::Debug::DebugScope

RAII helper for debug scope tracking. More…

#include <DebugUtilities.h>

Name
~DebugScope()
DebugScope(std::string_view name)
class EntropyEngine::Core::Debug::DebugScope;

RAII helper for debug scope tracking.

Logs entry and exit from code scopes. Provides execution flow visibility in debug logs. RAII ensures exit logging even when exceptions are thrown.

void complexAlgorithm() {
DebugScope scope("ComplexAlgorithm");
// Logs: "Entering: ComplexAlgorithm"
if (someCondition) {
DebugScope innerScope("ComplexAlgorithm::OptimizedPath");
// Logs: "Entering: ComplexAlgorithm::OptimizedPath"
doOptimizedWork();
// Logs: "Leaving: ComplexAlgorithm::OptimizedPath"
}
// Logs: "Leaving: ComplexAlgorithm"
}
inline ~DebugScope()
inline explicit DebugScope(
std::string_view name
)

Updated on 2026-01-26 at 17:14:35 -0500