Console.log called in the deactivate function doesn't print in the extension console

console.log called in the extension’s exported deactivate function doesn’t print in the extension console:

exports.deactivate = () => {
  // This doesn't print in the extension console:
  console.log('Deactivating…');
};

I was trying to use console.log in this context to debug my code, and I mistakenly thought at first that the deactivate export was not being called because nothing was printing to the extension console. It would be useful if console methods still print to the extension console no matter the context in which they are called.

If it really is technically impossible to fix this, to prevent confusion it would be important to update the docs about this limitation of the console API:

1 Like

It seems I’m not the only one to struggle with this:

Thank you for the report on this. I will file this in our bug tracker.

1 Like