Register template collector.
Do only enable debugger when debug mode is active.