Android Question B4A 9.30 mode debug problem

Discussion in 'Android Questions' started by gregorio_adrian_gimenez, Jul 19, 2019.

  1. gregorio_adrian_gimenez

    gregorio_adrian_gimenez Active Member Licensed User

    HI,

    Hello I have the following problem: When I run my code integrated with Firebase, the debug mode closes when it finishes downloading the installation, I use Bridge B4A, besides it delays in an excessive way the execution of the code, it is not a very big code. If I run the same code with an Android 24 emulator, debug mode works, but I can not use it with Firebase since it does not work with this feature. I have to try several times to be able to execute it in debug mode, and I can not move too far. Is there any possible solution? My laptop has an Intel icore5 7th gen regards
     
  2. yfleury

    yfleury Active Member Licensed User

    have you try usb cable to connect directely to the device?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Are you able to see the logs if you run the app again? You need to find the error message.
     
  4. gregorio_adrian_gimenez

    gregorio_adrian_gimenez Active Member Licensed User

    there is no error of any. The debug mode closes when you finish installing the app on your cell phone. the code is still not executed
     
  5. gregorio_adrian_gimenez

    gregorio_adrian_gimenez Active Member Licensed User

    Hi, I tried restarting adb server, I thought that would solve the problem, but it happened again
     
    Last edited: Jul 20, 2019
  6. emexes

    emexes Well-Known Member Licensed User

    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
     
    Shelby likes this.
  7. Erel

    Erel Administrator Staff Member Licensed User

    ADB is not used when you develop with B4A-Bridge.

    Two options:
    1. Enable USB debug mode and use it instead of B4A-Bridge.
    2. Create a new app with the same package and run it. This way you will be able to see the previous logs with B4A-Bridge.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice