[#4333261] Overiding how the env.debug value is configured and added a way to force setting the debug on.