@inspecta/panel
v0.0.2
Published
Debug client TypeScript React application for trace visualization
Maintainers
Readme
Debug Client TypeScript
A modern TypeScript-based React Flow visualization tool for debugging JavaScript execution traces. This is an improved version of the original DebugClient project with better code organization, type safety, and maintainability.
Features
- Interactive Node Graph: Visualize function calls, variables, data access, loops, and more as connected nodes
- Expandable Nodes: Double-click nodes to explore their children and trace execution flow
- Argument Expansion: Expand function arguments to see their detailed trace data
- Smart Filtering: Filter different trace types (functions, variables, data access, etc.)
- Undo/Redo: Full history management with keyboard shortcuts (Ctrl+Z, Ctrl+Y)
- Real-time Search: Search and select functions to start debugging from
- Error Highlighting: Visual indicators for nodes with errors
- TypeScript: Full type safety and better developer experience
Getting Started
Prerequisites
- Node.js (v16 or higher)
- A running debug backend server (typically on
http://localhost:3000)
Installation
npm installDevelopment
npm run devBuild
npm run buildLinting
npm run lintArchitecture
Key Components
- App.tsx: Main application component with React Flow integration
- TraceProcessor: Handles backend API calls and trace data processing
- Node Components: Individual node types (Function, Variable, Data, etc.)
- Layout Utils: ELK.js-based automatic graph layout
- Type Definitions: Comprehensive TypeScript types for all trace data
Improvements over Original
- TypeScript: Full type safety throughout the application
- Better Code Organization: Clear separation of concerns with dedicated folders
- Improved Error Handling: Better error boundaries and user feedback
- Enhanced Performance: Optimized rendering and state management
- Cleaner UI: More polished components and interactions
- Better Documentation: Comprehensive inline documentation
API Integration
The application expects a backend server running on http://localhost:3000 with the following endpoints:
GET /trace/functions/all- Returns list of all available functionsGET /trace/children?rawId={id}- Returns children traces for a given trace ID
Usage
- Start the application with
npm run dev - Click the search button or use the initial search overlay
- Select a function to start debugging from
- Double-click nodes to expand and explore the execution flow
- Use the filter panel to show/hide different trace types
- Use Ctrl+Z/Ctrl+Y for undo/redo operations
Contributing
This project follows standard TypeScript and React best practices. Please ensure all code is properly typed and follows the existing patterns.
