add debug argument that returns entire function environment as attribute