You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the log method throughout your app to accumulate extra context for possible crashes that can happen. For additional context, Crashlytics also offers various methods to set attributes for the crash report. You can also test Crashlytics by forcing a crash through the crash method.
38
+
Install the plugin by running the following command in the root directory of your project.
20
39
21
-
Crashlytics also supports sending JavaScript stack traces to the Firebase console. This can be used in any situation where an error occurs but is caught by your own code to recover gracefully. To send a stack trace, pass a JavaScript Error to the recordError method.
There are various methods to set attributes for the crash report, in order to provide analytics for crashes and help you review them. You can use set methods to set predefined attributes, but you can also set your own custom attributes.
46
+
### 3.1. <aname='Logacrashcontext'></a>Log a crash context
47
+
Use the `log` method throughout your app to accumulate extra context for possible crashes that can happen.
Crashlytics also supports sending JavaScript stack traces to the Firebase console. This can be used in any situation where an error occurs but is caught by your code to recover gracefully.
42
110
43
-
### Error Reports
111
+
To send a stack trace, pass a JavaScript Error to the `recordError` method.
44
112
45
-
Even if you catch unexpected errors, in order for your app to recover and behave smoothly you can still report them through Crashlytics using the recordError method. This will also provide you with the associated stack trace.
113
+
Even if you catch unexpected errors, for your app to recover and behave smoothly you can still report them through Crashlytics using the `recordError` method. This will also provide you with the associated stack trace.
### 3.5. <aname='Manuallyenableordisablecrashlyticscollection'></a>Manually enable or disable crashlytics collection
63
131
64
-
As Crashlytics will be sending certain information regarding the user, users may want to opt-out of the crash reporting. This can be done throughout the app with a simple method call to setCrashlyticsCollectionEnabled:
132
+
As Crashlytics will be sending certain information regarding the user, users may want to optout of the crash reporting. To disable crashlytics collection, call the `setCrashlyticsCollectionEnabled` method on `firebase().crashlytics()` passing it `false` This can be done throughout the app with a simple method call to setCrashlyticsCollectionEnabled:
0 commit comments