Only enable the debug interface when needed.