add api for enable/disable debug mod