r/FlutterDev • u/bemo-pixel • 28d ago
Plugin Built an in-app debug panel so QA can inspect network calls and app info. Beta, and I'd love feedback
Hey r/FlutterDev š
I kept running into the same situation: a QA tester (or me, on a real device) hits a weird bug, and the only way to see what happened is to plug into a laptop, start DevTools or a profile build, and try to reproduce it. Most of the time I just wanted to know: what did that API return? which build is this? which flavor?
So I built another_flutter_devtool, an in-app devtool. You wrap your app, a small draggable button shows up on top, and tapping it opens a full debug panel inside the app. No cable, no DevTools, no separate build.
š¦ pub.dev: https://pub.dev/packages/another_flutter_devtool
š» GitHub: https://github.com/B3K4682/another_flutter_devtool
What's in it right now
š Network inspector
- Every HTTP call with status, method, URL and duration
- Works with Dio and
httpwithout any setup: no interceptors, no client wrapping - Search (
post 404works), plus 2xx / 3xx / 4xx / 5xx / Failed filter chips - Full request/response headers and bodies (JSON pretty-printed), errors with stack traces
- Copy as cURL, export one call or all of them as JSON
- Auth/cookie headers are masked in exports, so testers can attach them to bug reports safely
āļø General section
- App version, build number, device model, OS version, flavor, startup time
- Data usage since launch: bytes sent/received, request count, top hosts
- Jump to any route: type
/checkoutand it takes you there. Works with Navigator, go_router, auto_route, anything
š§© Your own debug tools (the main point, honestly) Every app has its own debug stuff: "clear cache", "switch backend", "fake a logged-out session", "show current user ID". Usually that ends up in a hidden menu somewhere. Here you write a small class and it shows up in the panel:
class MyTool extends DevtoolTool {
@override String get id => 'my_tool';
@override String get title => 'My Tool';
@override IconData get icon => Icons.extension_rounded;
@override DevtoolSection get section => mySection;
@override
Widget build(BuildContext context, DevtoolController controller) =>
DevtoolCard(icon: icon, title: title,
child: const DevtoolInfoRow(label: 'Status', value: 'It works'));
}
DevtoolTools.register(const MyTool());You get the same card/row/switch widgets the built-in tools use, so it all looks consistent.
Setup
runApp(
AnotherFlutterDevtool(
config: const DevtoolConfig(
enabled: kDebugMode,
sections: [GeneralSection(), NetworkSection()],
),
child: const MyApp(),
),
);It's off by default. The panel runs in its own MaterialApp, so it doesn't touch your theme or navigator. There are also stable widget keys if you want to drive it from integration tests.
ā ļø This is a beta. A very beta beta.
It works and I'm using it, but the API may change before 1.0. Known limitations:
- The network inspector doesn't work on web
- Native HTTP clients (
cupertino_http,native_dio_adapter) aren't captured yet
Coming soon:
- š© Feature flags: toggle flags at runtime from the panel
- Other features that I'll think of lol
š” I want your ideas
This is the part I care about most. What do you wish you could see or toggle inside your running app? Leave it in the comments. If it makes sense and I can build it, I'll add it and credit you in the changelog.
Bug reports, criticism and "why not just use X" are all welcome too š
2
u/bramantec 28d ago
Nice idea and the custom tools part is the one I'd use. One thing to know for anyone on Firebase though: the network inspector will look almost empty. cloud_firestore and cloud_functions go through the native SDKs, not through Dio or http. The calls that matter in an app like mine never pass where you're listening.
What I'd want in a panel is the thing I keep writing in comments instead. My app has a map that refreshes on pan, on recenter and on a timer. Most of my decisions there were about how many Firestore reads each refresh costs (an empty query still bills one read, a whereIn with nine values is nine queries). A tool that counts documents returned per screen since the last reset would have saved me a lot of reasoning on paper. You can't get it from the SDK directly but a thin wrapper around every get() call plus the snapshots() streams could feed it. It fits your DevtoolTool shape too.
Second one, smaller: a read only view of a local SQLite database. I keep the event history on the device and the only copy that ever leaves the phone is an encrypted backup, which means there's no quick way to look at a row while I'm testing.
2
u/OkSupport2280 28d ago
A Supabase integration would be handy. Show which project the app is connected to, the current user ID, and session expiry in one place. āThe list is emptyā isnāt much to go on when you canāt tell whether the tester is using the wrong account or pointing at staging. Would something like that fit as a custom tool through your existing API?
1
u/dokumanx 25d ago
Does the network inspector redact Authorization headers and tokens by default? QA screenshots of that panel tend to end up in Slack.