[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change example to use kDebugMode on 'Report errors to a service' page #4976

Closed
ghenry opened this issue Nov 10, 2020 · 4 comments
Closed

Change example to use kDebugMode on 'Report errors to a service' page #4976

ghenry opened this issue Nov 10, 2020 · 4 comments
Assignees
Labels
a.cookbook Relates to a cookbook recipe or guide dev.debugging Relates to debugging Flutter apps e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible.

Comments

@ghenry
Copy link
ghenry commented Nov 10, 2020

Page URL: https://docs.flutter.dev/cookbook/maintenance/error-reporting
Page source: https://github.com/flutter/website/tree/master/src/docs/cookbook/maintenance/error-reporting.md

Description of issue:

Do we need this any more as there is kDebugMode in flutter/foundation.dart

bool get isInDebugMode {
  // Assume you're in production mode.
  bool inDebugMode = false;

  // Assert expressions are only evaluated during development. They are ignored
  // in production. Therefore, this code only sets `inDebugMode` to true
  // in a development environment.
  assert(inDebugMode = true);

  return inDebugMode;
}

and in https://github.com/flutter/crashy/blob/cf40e4723a698010103c5aaf2b40ce8750d092a0/lib/main.dart#L50

Thanks.

@sfshaza2
Copy link
Contributor

That makes sense to me! @domesticmouse, can you take this?

@sfshaza2 sfshaza2 added e1-hours Effort: < 8 hrs p2-medium Necessary but not urgent concern. Resolve when possible. labels Nov 11, 2020
@atsansone atsansone added the from.page-issue Reported in a reader-filed concern label May 19, 2023
@atsansone atsansone added dev.debugging Relates to debugging Flutter apps a.cookbook Relates to a cookbook recipe or guide labels May 30, 2023
@atsansone atsansone changed the title 'Report errors to a service' page issue: switch example to use kDebugMode Change example to use kDebugMode on 'Report errors to a service' page May 30, 2023
@atsansone
Copy link
Contributor

Consider other related issues: #2315 and #5055.

@domesticmouse
Copy link
Contributor

I'm confused. The referenced flutter/crashy github project is a 404. And I don't see isInDebugMode referenced on https://docs.flutter.dev/cookbook/maintenance/error-reporting

Perchance this two year old bug report is stale?

@domesticmouse
Copy link
Contributor

Closing this as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.cookbook Relates to a cookbook recipe or guide dev.debugging Relates to debugging Flutter apps e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible.
Projects
None yet
Development

No branches or pull requests

4 participants