How to fix Redis Error “ERR DEBUG command not allowed.”

While developing apps using Redis, if you are trying to use the command DEBUG and Redis throws the error “ERR DEBUG command not allowed.”, here’s how you fix it.