Skip to content

Flutter web debugger is getting disabled after running the app #8301

Open
@CrowdFeeding123

Description

@CrowdFeeding123

Steps to reproduce

Steps to Reproduce:

  1. Open project in Android Studio.
  2. Add breakpoints in Dart code (e.g. main.dart, build(), async methods, etc.).
  3. Start the app in Debug mode.
  4. Observe breakpoints become greyed out as soon as the app is launched.
  5. print() statements still log output, but debugger does not pause.

Expected results

Breakpoints should remain active and be hit during execution.

Actual results

Image Image

Code sample

Code sample
import 'package:go_router/go_router.dart';
import '../app_init.dart';
import '../common/constants.dart';
import '../common/constants/routes_name_list.dart';
import '../common/helper/shared_preferences/shared_pref_extension.dart';
import '../common/helper/shared_preferences/shared_pref_storage.dart';
import '../main_layout/main_web_layout.dart';
import '../screens/getstarted/get_started_screen.dart';
import '../screens/users/login/login_screen.dart';
import '../screens/users/registration/registration_screen.dart';

class AppRouter {
  static final GoRouter router = _buildRouter();

  static GoRouter _buildRouter() {
    return GoRouter(
      redirect: (context, state) {
        final isLoggedIn = SharedPrefStorage().isLoggedIn;
        if (!isLoggedIn && state.matchedLocation != RouteList.login) {
          return RouteList.initialPath;
        }
        if (isLoggedIn && state.matchedLocation != RouteList.dashboard) {
          return RouteList.dashboard;
        }
        return null;
      },
      routes: [
        GoRoute(
          path: RouteList.initialPath,
          name: RoutesNameList.appInit,
          builder: (context, state) => const AppInit(),
        ),

        /// Auth routes
        GoRoute(
          path: RouteList.getStarted,
          name: RoutesNameList.getStarted,
          builder: (context, state) => const GetStartedScreen(),
        ),
        GoRoute(
          path: RouteList.login,
          name: RoutesNameList.login,
          builder: (context, state) => const LoginScreen(),
        ),
        GoRoute(
          path: RouteList.register,
          name: RoutesNameList.register,
          builder: (context, state) => const RegistrationScreen(),
        ),

        /// Main dashboard route
        GoRoute(
          path: RouteList.dashboard,
          name: RoutesNameList.dashboard,
          builder: (context, state) => const MainWebLayout(),
        ),
      ],
    );
  }
}


Image

Screenshots or Video

Screenshots / Video demonstration

[Upload

Image Image

media here]

Logs

Logs
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
This app is linked to the debug service: ws://127.0.0.1:54358/V9NRyqbnuRM=/ws
Debug service listening on ws://127.0.0.1:54358/V9NRyqbnuRM=/ws
Debug service listening on ws://127.0.0.1:54358/V9NRyqbnuRM=/ws
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ 12:35:45.682 (+0:00:00.001000)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│  🚀 App Starting - main.dart
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Configurations.setConfigurationValues 123 {publishableKey: pk_test_syl720IY4iwLkNzmOeL7nz3J, paymentMethodIds: [stripe], enabled: true, enableApplePay: false, enableGooglePay: false, merchantDisplayName: FluxStore, merchantIdentifier: merchant.com.inspireui.mstore.flutter, merchantCountryCode: US, returnUrl: fluxstore://inspireui.com, enableManualCapture: false, saveCardAfterCheckout: false, stripeApiVersion: 3}
Got object store box in database fstore_settings.
Got object store box in database fstore_user.
Got object store box in database fstore_cache.
Got object store box in database fstore_biometrics.
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ 12:35:46.213 (+0:00:00.532000)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│  Exception: [GMS Availability]: Need to call GmsCheck().checkGmsAvailability() before using GmsCheck().isGmsAvailable.
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ 12:35:46.215 (+0:00:00.534000)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│  🔴 Firebase init issue
└─────────────────────────

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.5 24F74 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[!] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.
      Download at: https://developer.apple.com/xcode/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] VS Code (version 1.101.1)
[✓] Connected device (2 available)
[✓] Network resources
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions