Let's only do this heavy debugging when we're a debug build

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>