[SOLVED] How to detect debug in browser or running app

I use the cordova-plugin-facebook4 plugin.

Since I perform an automatic login, each time I debug my app (ionic serve) I get an error in the chrome console.

Therefore I want to add a test to my code, to avoid the call of the login while I’m debugging.

Anyone knows how could I detect if I’m currently debugging in the browser or if I’m running the app?
Thru the platform? Or is there a way to detect that the mode “enableProdMode()” is activated?

something like

this.platform.ready().then(() => {
   if (this.hereMyNewTestImNotDebugging()) {

Up, anyone have got an idea?

You probably want to use Platform?

So obvious…gonna try thx

if (this.platform.is('cordova')) {
   // Do stuff on mobile and not in my browser
1 Like