Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 1.3 KB

File metadata and controls

36 lines (31 loc) · 1.3 KB

debug-scene-cpp

A lightweight C++ debug framework inspired by Three.js (Scene/Camera/Renderer). 定位:Developer-specific debug tool (for development stage),not a test framework.

Core Concept (Map to Three.js)

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

Quick Start

  1. Copy debug_scene.h to your project;
  2. Include the header file: #include "debug_scene.h";
  3. Use the framework with the core API (see Usage Example).

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;
}

License

MIT