I just learned about console.context() via https://devtoolstips.org/tips/en/create-contextual-console-loggers/
This can be used to filter messages by the context via the context: operator in the filter search box.
We could create info, warn, and log, error functions which we expose to the client-side extensions' initialize() and finalize() functions as well. Maybe these functions could automatically take into account the value of isDebug coming from WP_DEBUG in PHP, so that they automatically no-op when called. That would avoid the need to wrap calls in if ( isDebug ) { ... } all the time in extensions.
I just learned about
console.context()via https://devtoolstips.org/tips/en/create-contextual-console-loggers/This can be used to filter messages by the context via the
context:operator in the filter search box.We could create
info,warn, andlog,errorfunctions which we expose to the client-side extensions'initialize()andfinalize()functions as well. Maybe these functions could automatically take into account the value ofisDebugcoming fromWP_DEBUGin PHP, so that they automatically no-op when called. That would avoid the need to wrap calls inif ( isDebug ) { ... }all the time in extensions.