Okay - I know that you wish things were different, but here you are in a frustrating situation. I am not sure that I can help you much but here are a couple of observations from your case study above. At step 7 ...
That is what happens when you run in debugger mode - your app is not actually running in the device (don't ask me how this is achieved) and code changes are "instantly" applied without the need to download a replacement app. It is very quick - just what you want when debugging. You have to be a little careful if you make a coding change in initialisation code, of course, as this code might not run again when you restart.
Also Step 9 ...
This is also suspicious because the bridge does not disconnect in normal circumstances - something has already gone wrong.
Look - you probably have an expectation that something somewhere should happen in a certain way and are acting accordingly, but in fact your expectation is incorrect. I am afraid that I can't look at this any more at the moment. I will come back to it later in the day if I can. Good luck.
Thanks for that piece of info:
Another piece of the jigsaw - "your app is not actually running in the device"
How did you find that out?
If this is the case it would seem that the B4A debugging system is just using the phone UI. (Screen, buttons, audio etc) Is this correct? It would make a lot of sense to do it this way.
The interesting thing about this is that when debugging the code is being run in an Intel x86/64 processor environment, but then is run on an Android which usually has an ARM processor. It shouldn't matter of course because the java engine and operating system of the phone should make the environment identical from the Apps point of view.
What about things like DB files? Is it using the ones on the phone or the pc files of the project?
So cleaning isn't required, as once the app is loaded for the first time under debugging, stopping the debugger making the code changes then restarting the debugger is using the modified code based on the PC of the IDE.
It all becomes clear.
As for the B4A bridge dropping out, this only happens occasionally. It might be caused by my switching B4A IDE instances and forgetting to reconnect to the instance I am working on.
I am going to reinstall my copy of the Genymotion Android Emulator. It costs a little bit, but it is easy to install and works every time. This will make my development a bit smoother.