Files
CodeInspector/README.md
T

2.5 KiB

CodeInspector

A developer tool to inspect C and C++ codebases, compile inspected code on the fly, edit code live, inspect function arguments through an interactive panel, and visualize execution call trees & flamegraphs.

Built with Raylib + Dear ImGui (Docking branch), featuring a unity build and lightweight build.bat (inspired by RAD Debugger / raddbg).

Remote repository: https://gitea.itspm.cc/Patedam/CodeInspector


Features (MVP)

  • Code Viewer & Live Editor: View and edit C/C++ source code directly with line numbers and syntax highlighting.
  • Function Inspector: Inspect discovered functions (e.g. factorial(int n)), tweak inputs/parameters in real time using interactive widgets.
  • Live Compiler: Fast on-the-fly compilation of inspected code into dynamic modules.
  • Execution Flamegraph & Call Tree: Visualize call hierarchy, recursion depth, parameter values, return values, and execution timing per frame.
  • Diagnostic / Log Console: Live compilation diagnostics, errors, warnings, and execution metrics.
  • Dockable IDE Layout: Powered by Dear ImGui Docking with custom dark theme.

Project Structure

CodeInspector/
├── build.bat                  # Fast MSVC / Clang unity build script
├── .gitignore
├── README.md
├── vendor/
│   ├── raylib/                # Raylib 5.0 (headers & static lib)
│   ├── imgui/                 # Dear ImGui (docking branch)
│   └── rlImGui/               # Raylib-ImGui integration layer
├── src/
│   ├── main.cpp               # Application entry point & unity build root
│   ├── app/                   # Application lifecycle & state
│   ├── code/                  # Source file management & C tokenizer/parser
│   ├── runner/                # Dynamic compiler, invocation & execution tracer
│   └── ui/                    # Editor, Inspector, Flamegraph & Log panels
└── samples/
    └── factorial/
        └── factorial.c        # Sample recursive program

Quick Start & Building

The project uses a unity build with MSVC (or Clang) for sub-second build times without CMake.

1. Build (Debug)

build.bat

(Auto-detects Visual Studio 2022 / 2019 using vswhere.exe if not already in a Developer Command Prompt)

2. Build and Run

build.bat run

3. Release Build

build.bat release

4. Clean Build Directory

build.bat clean