Implemented debug-adding-mechanism.
Should work, need testing.