Much to my bemusement, a minor change to a Plone product I’m writing caused Zope to silently fail to start. Why no error message? Since I was running Zope in debug-mode, this seemed like a problem. After exhausting what I thought were the obvious approaches to diagnosing the problem, I finally decided to review what debug-mode does. From the zope.conf that comes with Zope 2.9.7-final:
# Directive: debug-mode
# A switch which controls several aspects of Zope operation useful for
# developing under Zope. When debug mode is on:
# - The process will not detach from the controlling terminal
# - Errors in product initialization will cause startup to fail
# (instead of writing error messages to the event log file).
So Zope debug-mode is designed to produce silent failures for “errors in product initialization”. Absolute fucking genius. Principle of Least Astonishment, anyone?