discover: Add debug flag to config