A lightweight C++ debug framework inspired by Three.js (Scene/Camera/Renderer). 定位:Developer-specific debug tool (for development stage),not a test framework.
| Three.js | debug-scene-cpp | Responsibility |
|---|---|---|
| Scene | Environment | The core execution base for all debug operations |
| Mesh | test_case_x | The minimal unit for carrying debug data (variable + description) |
| Mesh API | createCase | Simple API for creating and mounting debug cases |
| Renderer | Environment::print | Output debug information to console |
- Copy
debug_scene.hto your project; - Include the header file:
#include "debug_scene.h"; - Use the framework with the core API (see Usage Example).
#include "debug_scene.h"
using namespace debug_framework;
int main() {
Environment debug_env;
int num = 0;
for (int i = 0; i < 3; ++i) {
num += i;
createCase(test_case_x<int>(num, "num after " + std::to_string(i+1) + " loop"));
}
debug_env.print<int>();
return 0;
}MIT