Add an environment variable (EVENT_DEBUG_MODE) to run unit tests in debug mode

Not all tests currently pass with debug mode on.