Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I see more details about exactly what the Firebase JavaScript client is doing?

Tags:

firebase

I want more insight into what the Firebase JavaScript client library is doing.

I'm developing a JavaScript app using Firebase that has to deal with a lot of complexity. For example, it has to handle network disruptions and intermittent periods of high latency. The client library is handling this, but I want to know more about how it's doing that.

Is there a way to enable verbose logging?

like image 854
mimming Avatar asked Mar 18 '23 14:03

mimming


1 Answers

Yes! You can enable debugging logs like this:

Firebase.enableLogging(true);

You can either add that to the source code for your app, or paste it into your web browser's JavaScript console.

Once enabled, the Firebase client library prints a whole bunch of logs to your JavaScript console.

Note: It's probably not a good idea to run this in production. It increases the bandwidth that clients use considerably.

like image 145
mimming Avatar answered Apr 28 '23 07:04

mimming