Added support to debug base and custom mode

Added support to debug base and custom mode