Feature/debug object

Not a very clean implementation, let me know if you'd like me to touch it up/provide tests etc.