layerx_debugger 1.1.0
layerx_debugger: ^1.1.0 copied to clipboard
Drop-in debugger and logger for Flutter and GetX: pretty console logs, Dio/http capture, crash handling, route, widget and performance tracking, plus an in-app log viewer.
Changelog #
All notable changes to layerx_debugger are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.0 #
Added #
- Redesigned in-app debugger UI — A completely new bottom-navigation experience
with four destinations: Dashboard (session health score, live metric cards,
latency sparkline, recent issues), Network (request rows with method/status/
latency and
All / Errors / Slow / Δ Changedfilters), Console (all-source timeline with source filters + search), and Inspector (overview, response, request, and trace tabs, schema-diff and suggested-fix). Cyan + white brand accent. - Floating button visibility control — The FAB and edge-swipe trigger now hide automatically while the debugger is open and restore on exit, preventing duplicate buttons and overlay conflicts.
- Automatic frame-drop (jank) capture —
LayerXFrameMonitorrecords slow frames as performance warnings (rate-limited), installed automatically when performance logging is enabled. - Smarter API response handling — A
2xxresponse whoseContent-Typeclaims JSON but whose body fails to parse is now flagged as a contract violation ("Unexpected response structure") instead of passing silently as success. LayerXNetworkLogger.recordParsingError(...)— A helper to report client-side model-mapping / deserialization failures so they surface as warnings with the offending response body.- Opt-in Dio integration —
LayerXDioInterceptor, available viapackage:layerx_debugger/dio.dart, forwards Dio responses and errors to LayerX.
Changed #
- Rebuilt setup CLI — Content-based detection of the logger/HTTP services
(renamed classes are still found), idempotent marker-block injection, automatic
Dio interceptor wiring, a guided snippet fallback for unrecognized HTTP wrappers,
graceful skip when no HTTP service exists, a clear abort when no logger exists, and
a post-run
dart format+flutter analyzereport. The injected dependency version is now resolved from the package itself.
Removed #
- Legacy internal viewer screens (
LxLogListScreen,LxLogDetailScreen) and their now-unused part widgets, superseded by the new shell.
1.0.6 #
Added #
- Auto-Setup CLI & Automatic Bindings — Created a fully automated
dart run layerx_debugger:setupcommand to seamlessly inject setup parameters, wrapmain.dart, integrate overlay, and dynamically bind Logger and HTTP service configurations. - Idempotent CLI Steps — Steps are verified to be fully idempotent, preventing redundant code modifications.
- Constructor Injection Precision — Added robust parsing to safely patch Logger constructors and target classes without creating stray formatting or trailing comma syntax issues.
1.0.5 #
Added #
- Premium Dark UI Redesign — Completely redesigned the in-app log viewer from scratch with a premium, high-end dark theme.
- Added new central
LxThemedesign-token system for colors, typography, glowing overlays, cards, and animated indicators. - Redesigned
LxLogListScreenwith dark glass layout, live pulse dot, inline stats bar, custom clear confirmation dialog, and terminal-inspired empty state. - Redesigned
LxLogDetailScreenwith dark terminal aesthetics, custom syntax highlighted JSON viewer, dark schema diff tables, and custom level-based accent glow cards. - Updated widgets (
LxFabTrigger,LxEdgeTrigger,LxFilterBar,LxLogTile,LxSourceChip,LxDetailCard,LxSolutionCard,LxJourneyTimeline) to align with the premium dark theme and utilize glowing accents. - Fixed navigator context crash by implementing a robust element tree traversal engine (
LayerXDebugger.findNavigator(context)) to automatically locate the activeNavigatorStatewhen the context is above the Navigator (e.g. fromMaterialApp.builderor nested contexts).
- Added new central
1.0.4 #
Fixed #
-
Architecture detection now uses folder structure, not class names — the
dart run layerx_debugger:setupCLI previously scanned source files forLayerXController/LayerXServiceclass names, which caused false negatives on valid LayerX projects. Detection now checks for the canonical LayerX folder layout underlib/app/:lib/app/mvvm/— requiredlib/app/services/— requiredlib/app/config/,lib/app/repository/,lib/app/widgets/,lib/app/customWidgets/— optional (shown as ✓ if present, never required)
A project is considered LayerX-compliant if
lib/app/exists and at least one of the required folders is present. The abort message now also shows the exact expected folder structure to make the requirement clear.
1.0.3 #
Added #
- LayerX Architecture detector in
dart run layerx_debugger:setup— the CLI now scanslib/for LayerX signals (LayerXController,LayerXService,LayerXDebugMixin,GetMaterialApp,GetPage) before running any setup steps. If no LayerX pattern is detected, setup is aborted with a clear, color-coded terminal message directing the user to adopt the LayerX Architecture first usinglayerx_generator. Nothing is written to the project in this case — the tool is fully non-destructive on abort.
1.0.2 #
Fixed #
- Navigator context crash —
LxFabTrigger,LxEdgeTriggerandLayerXDebugger.openViewernow useNavigator.of(context, rootNavigator: true)(andshowModalBottomSheetusesuseRootNavigator: true). Previously, tapping the floating 🐛 button or swiping the edge trigger threw "Navigator operation requested with a context that does not include a Navigator" becauseLayerXDebugOverlayis placed insideMaterialApp'sbuilder:callback — which sits above theNavigatorin the widget tree. Using the root navigator bypasses this scope and resolves the crash.
1.0.1 #
Added #
dart run layerx_debugger:setupCLI — one command auto-configures LayerX Debugger in any Flutter project: injects the dependency intopubspec.yaml, runsflutter pub get, wrapsmain()withLayerXDebugger.runZonedGuarded+initialize(), and injectsLayerXDebugOverlaybuilder +navigatorObserversintoMaterialApp/GetMaterialApp. Original files are backed up as.bak. Fully idempotent — safe to re-run multiple times. An optional project path argument is also supported:dart run layerx_debugger:setup /path/to/project.
1.0.0 #
🎉 First release — in-app debugging for Flutter.
A complete, zero-boilerplate debugging ecosystem that lives inside your running app:
one LayerXDebugger.initialize() call wires up logging, network capture, crash handling,
GetX integration and a full in-app log viewer.
Added #
- In-app viewer — draggable floating button, edge-swipe and
LayerXDebugSettingsButton, plusLayerXDebugger.openViewer(context)to open it from any button. Searchable, filterable, color-coded log list with a session-health banner and a rich detail screen. - "Who owns this bug?" blame engine — attributes each failure to app / backend / network with a QA-ready note, a suggested fix, and a step-by-step journey timeline.
- API response diffing — detects when a backend changes its JSON shape and renders a field-level diff (added / removed / type-changed / value-changed).
- Logging —
LayerXLog.d/i/w/e/s(+v,wtf),LayerXLog.screen(),LayerXLog.action(), structuredlog(...),apiError(...), andObject.logD()/logE()/...extensions. Colored, emoji-tagged console output with boxed┌─ │ └API blocks; auto-disabled in production. - One-call setup & detection — applies config, installs crash handling, and (in a LayerX/GetX app) auto-registers the LayerX GetX services with duplicate-prevention and a double-initialization guard. Best-effort architecture detection activates modules incrementally and prints a status banner.
- Auto-injected GetX services —
LayerXLoggerService,LayerXDebugService,LayerXCrashService,LayerXNetworkService,LayerXPerformanceService,LayerXRouteService(viaLayerXBindings). - Networking —
httpis the primary integration viaLayerXHttp(get/post/put/patch/delete) and the sharedLayerXNetworkLogger; sensitive fields are masked (********). Dio is supported optionally via a documented interceptor recipe — no forceddiodependency. - Crash handling — global
FlutterError,PlatformDispatcherand zone capture, with anonCrashhook for optional Firebase Crashlytics / Sentry forwarding. - GetX —
LayerXController,LayerXService,LayerXDebugMixin, andLayerXRouteMiddleware;LayerXRouteObserverfornavigatorObservers. - Performance & widgets —
LayerXProfiler.start/end/measure(name, fn)and theLayerXDebugWidget(tag:)rebuild counter. - Configuration —
LayerXDebugConfigwith per-feature toggles, sensitive-key masking,LayerXEnvironment(dev/staging/prod) verbosity,autoInjectandisLayerXArchitecture.