Add "debug" preference to log debug messages into Error Console
(not used for now)