Sometimes one can over-think things and go looking for an intergalactic laser driven solution when a simple screwdriver is just as good, if not better.
I was looking for a way to temporarily "disable" a project so it could only be run from inside the IDE. Why? Because I have just spent a day inserting debugging code in it and wanted to stop myself and colleagues running the last compiled version.
The salubrious Mr Bruce Steers came up with the simple solution.
Brilliant! If not, well, brilliant.Try this in your startup class
#If Exec
Quit
#Endif
When compiling an exe gambas sets the x flag. The IDE does not when debugging.
b