set debugging on, and make library consume events