[build] Added debug flag whenever the build ment to be debug
[feature] Added debug information to the layer in debug builds

This will allow us to easly track the origin of the layer and to improve the
debug capabilities of the system.