{"repo":"ruiyangzhou01/CppTrace","free":true,"listed":false,"github":"https://github.com/ruiyangzhou01/CppTrace","clone":"git clone https://github.com/ruiyangzhou01/CppTrace.git","description":"Lightweight C++ logging library for tracing variables.","language":"C++","stars":16,"topics":["logging","cpp","debugging","cmake"],"license":"GPL-3.0","category":"dev-tools","readme_excerpt":"CppTrace English 简体中文 Deutsch Español Français 日本語 CppTrace is a single-header C++14 tracing helper that prints variable information to standard output. It ships as one header file ( CppTrace.h ) and includes helper functions for redirecting output to a log file. Features - Single-header library (just CppTrace.h ). - Trace scalar variables with trace . - Trace fixed-size arrays with traceArr . - Optional cycle counters for nested loops ( std::list ). - Optional descriptions for each trace. - Output includes variable name, typeid(...).name() , value(s), function scope, line number, cycle indices, and description. - Helpers to redirect stdout to a file ( InRedirect2File , OutRedirect2File ). Screenshot Requirements and limitations - C++14 compiler. - Windows-only out of the box because CppTrace.h includes and uses GetLocalTime . - traceArr accepts fixed-size arrays only (not pointers or STL containers). It determines the used length by scanning for \\0 , so arrays should be zero-initialized or null-terminated. - Type names come from typeid(...).name() and are compiler-specific (not demangled). Install 1. Go to the GitHub releases page. 2. Expand Assets and download the CppTrace.h header file. 3. Include the header file in your project. Build the demo The repository includes main.cpp as a usage demo. On Windows, you can build it with CMake: Usage Include the header and use the tracing macros in your code: The optional cycleVariables argument is a std::list (typically loop indices","default_branch":null,"files":null,"tree":[],"storefront":"/r/ruiyangzhou01","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ruiyangzhou01/CppTrace/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}