restrict debug mode to local env