socket_trace 1.0.0
socket_trace: ^1.0.0 copied to clipboard
WebSocket and gRPC tracing library with automatic packet capture, timeline integration, and live debugging UI. Like Chrome DevTools for Flutter!
1.0.0 #
Initial release of socket_trace!
Features #
- ✅ Automatic WebSocket tracing with
SocketTrace.enable() - ✅ Drop-in replacement for
WebSocket.connect()withSocketTrace.connect() - ✅ Embedded debug server that runs in background isolate
- ✅ Modern web UI for live packet monitoring at http://localhost:4000
- ✅ Timeline integration via VM service for DevTools
- ✅ gRPC interceptor for tracing gRPC traffic
- ✅ Real-time statistics (packet counts, bytes transferred)
- ✅ Flutter UI widget for in-app debugging
- ✅ Event buffering and replay
- ✅ Pause/resume packet capture
- ✅ Export captured packets to JSON
- ✅ Zero configuration - works out of the box
API #
SocketTrace.enable()- Enable automatic tracingSocketTrace.connect()- Traced WebSocket connectionSocketTrace.disable()- Disable tracingEmbeddedDebugServer.start()- Start background debug serverEmbeddedDebugServer.stop()- Stop debug serverWebSocketProfiler.connect()- Manual profilingSocketTraceGrpcInterceptor- gRPC interceptorSocketTraceView- Flutter UI widget
Documentation #
- Complete API documentation
- Usage examples
- Integration guides
- Troubleshooting tips
Examples #
- Basic usage example
- Automatic tracing demo
- gRPC integration example
- Flutter UI integration
Supported Platforms #
- Flutter (iOS, Android, Web, Desktop)
- Dart CLI applications
Requirements #
- Dart SDK: >=3.0.0 <4.0.0
- Flutter: >=3.0.0