I am following the user-guide for package developing: https://www.haskell.org/cabal/users-guide/developing-packages.html#quickstart
I got stuck in the Flags
Flags
With cabal-2.1.0 you can do it like this:
cabal-2.1.0
cabal new-build -f debug