[ADD] debug support
[MOD] debugging extracted into the module