Network Debugger - Dart Packages Documentation
This documentation covers the Dart client packages for integrating with the Network Debugger proxy server.
Overview
Network Debugger is a local proxy server that intercepts and records HTTP and WebSocket traffic from your Dart/Flutter applications. These packages provide seamless integration with popular Dart networking libraries.
Available Packages
| Package | Purpose | Library Integration |
|---|---|---|
| dio_debugger | HTTP debugging | package:dio |
| http_debugger | HTTP debugging | package:http, dart:io HttpClient |
| web_socket_debugger | WebSocket debugging | package:web_socket |
| web_socket_channel_debugger | WebSocket debugging | package:web_socket_channel |
| socket_io_debugger | Socket.IO debugging | package:socket_io_client |
Documentation Index
- Quick Start Guide - Get up and running in 5 minutes
- Desktop Setup Guide - Install and run desktop app
- Configuration Guide - Environment variables, dart-define, and runtime config
- Proxy Modes - Understanding reverse vs forward proxy
- Platform Support - dart:io vs Web platform differences
- Troubleshooting - Common issues and solutions
- API Reference - Complete API documentation
Quick Links
Starting the Proxy Server
bash
# Install CLI globally
dart pub global activate network_debugger
# Start proxy server
network_debugger
# Default ports:
# - Proxy: http://localhost:9091
# - Web UI: http://localhost:9092Basic Integration Example
dart
import 'package:dio/dio.dart';
import 'package:dio_debugger/dio_debugger.dart';
void main() {
final dio = Dio();
// Add debugger interceptor
dio.interceptors.add(
DioDebugger.interceptor(
proxyBaseUrl: 'http://localhost:9091',
),
);
// All requests now go through the proxy
dio.get('https://api.example.com/users');
}Architecture
┌─────────────────────┐
│ Flutter/Dart App │
│ ┌───────────────┐ │
│ │ dio_debugger │ │
│ │ http_debugger │ │
│ │ ws_debugger │ │
│ └───────┬───────┘ │
└──────────┼──────────┘
│
▼
┌─────────────────────┐
│ Network Debugger │
│ Proxy Server │
│ (localhost:9091) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Upstream Server │
│ (api.example.com) │
└─────────────────────┘Requirements
- Dart SDK >= 3.0.0
- Flutter >= 3.10.0 (for Flutter projects)
- Go >= 1.21 (for running the proxy server)
License
MIT