Constructing method for enabling debug mode.