lock debug mode