Improved  changing of application debug  mode.