Mbed 6 build profiles

I tried to use another build profile, described in the docs in platform.ini
build_flags = -D MBED_BUILD_PROFILE_DEBUG
that doesn’t work, it compiles always as a release version.
What I’m doing wrong?
The link to the mbed website for build profiles is wrong.