ensure console.debug is a function