Skip to content

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

PackagePurposeLibrary Integration
dio_debuggerHTTP debuggingpackage:dio
http_debuggerHTTP debuggingpackage:http, dart:io HttpClient
web_socket_debuggerWebSocket debuggingpackage:web_socket
web_socket_channel_debuggerWebSocket debuggingpackage:web_socket_channel
socket_io_debuggerSocket.IO debuggingpackage:socket_io_client

Documentation Index

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:9092

Basic 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