I have to try several times to be able to execute it in debug mode
Does that mean: after trying several times, your program eventually (sometimes?) executes in debug mode?
Sometimes in the heat of programming battle, the obvious can be forgotten, or shortcuts taken, so (at the risk of appearing to teach you to suck eggs)...
I haven't used Firebase, but when I experience problems of a similar vein, then:
First thing I would try is restart
every device that is part of the debug chain (computer, router, Android device) ie turn them *
all* *off* and then turn them on again. Presumably you've already tried this.
Second thing I would try is to remove the likely culprit. Can you do that with Firebase? You might need to create a dummy object with methods and properties so that the rest of your program at least compiles, and starts to run. All it has to do is get to the first Log statement so that you know the program is running in debug mode ok.
Third thing then is to add back the Firebase module, ideally under a different name so that it only gets loaded, not actually used. See if debug mode still runs.
If it does, then start slowly changing your program over from using your dummy object to using the real Firebase, testing after each change.
If it's any consolation, I've occasionally had debug mode vanish, usually when there's a deadline looming and I'm making
just one last change. But it hasn't happened to me since the B4A v9 update, so perhaps whatever that was is now fixed.
I did recently discover the hard way that running two instances* of B4A IDE makes the B4A-Bridge connection super-flakey ;-/
* accidentally and unknowingly, not on purpose