Disabling menu items like "open file" in debug mode