in_app_debug_console 1.0.0
in_app_debug_console: ^1.0.0 copied to clipboard
An in-app debug console for Flutter. Logs, network requests, device info, performance and debug tools inside your running app.
in_app_debug_console #
See your logs, print() output and errors directly inside your running Flutter app. Useful when testing on a real device without a computer attached.
Features #
- Draggable button that opens a full-screen console
- Network: records HTTP requests made through
dart:io(package:http, Dio,Image.network) with method, status, timing, size, headers and bodies. Filter by status class and search by URL - Logs: captures
print(),debugPrint(), Flutter errors and uncaught errors, with log levels (debug, info, warning, error), search and level filters - Info: device and app details
- Tools: debug switches such as layout bounds and the performance overlay
- Tap an entry to see its details, copy or clear everything with one tap
- Light and dark themes
- Only shown in debug builds by default
Getting started #
dependencies:
in_app_debug_console: ^1.0.0
Usage #
import 'package:in_app_debug_console/in_app_debug_console.dart';
void main() {
DebugConsole.runGuarded(() => runApp(const MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
builder: (context, child) => DebugConsoleOverlay(child: child!),
home: const HomePage(),
);
}
}
Log your own messages:
DebugConsole.instance.i('User signed in');
DebugConsole.instance.w('Slow response');
DebugConsole.instance.e('Request failed', error, stackTrace);
Network requests are recorded automatically in debug builds when you use runGuarded. Pass captureNetwork: false to turn this off. Network capture does nothing on the web.
To log screen changes, add the route observer:
MaterialApp(
navigatorObservers: [DebugConsole.instance.navigatorObserver],
// ...
)
To show the console in release builds too (for testers), pass enabled: true to DebugConsoleOverlay.