when I select "debug" in the IDE and run my program then I see the Debug module at the bottom of the screen.
That's OK.
But after some seconds the debugger disconnects.
I have found that the reason is an "ExitApplication" statement that I have in main.Activity_resume
If I remove "ExitApplication" then the debugger runs fine.
What I dont understand is, why my programm continues to run in the emulator even though Main.Activity_resume and "ExitApplication" is executed
If the uUser press the Back-Button and returns from another activity to the main activity then I assume that the user wants to quit the program..so I call ExitApplication
But why does my program continue to run in the emulator even after ExitApplication was executed?
(The Debugger is disconnected but the program still runs)
In my opinion, the proper way of handling activities is to close them using activity.finish every time you exit one of them. This way, you will never have to worry about having left an open activity.
If for some reasons you need to keep activities open, all the way long, you could use a boolean flag in order to tell each one of them to finish when you choose so. Still, I wouldn't advice doing so from my experience with such coding.