You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context
To build the feature and test the beacon script, we relied a lot on console.log() in the beacon implementation to track what was going on there. This can be very valuable for debugging later on and investigations. However, this should not happen for "normal" usage.
Expected behavior
When the script has injected from the WP Rocket plugin while DEBUG mode was off, the beacon script should not output any log.
When the script has injected from the WP Rocket plugin while DEBUG mode was on, the beacon script should output logs.
Acceptance Criteria
Enable debug mode (WP_ROCKET_DEBUG = true).
Clear the critical images and cache ; enable LCP/ATF.
Browse to a page on the website, and check the dev tools: logs from the beacon script should be output in the console.
Disable debug mode (WP_ROCKET_DEBUG = true).
Clear the critical images and cache ; enable LCP/ATF.
Browse to a page on the website, and check the dev tools: no logs from the beacon script should be in the console.
Additional information
Maybe we could pass the value of the debug mode to the script when injecting it? The same way we do with a few configurations already. And use this as a condition around our console.log?
With this solution, when the beacon is injected while on DEbug mode, then deactivate debug mode, the beacon will still output logs as it can be cached in a page. That's acceptable I think.
The text was updated successfully, but these errors were encountered:
Context
To build the feature and test the beacon script, we relied a lot on console.log() in the beacon implementation to track what was going on there. This can be very valuable for debugging later on and investigations. However, this should not happen for "normal" usage.
Expected behavior
When the script has injected from the WP Rocket plugin while DEBUG mode was off, the beacon script should not output any log.
When the script has injected from the WP Rocket plugin while DEBUG mode was on, the beacon script should output logs.
Acceptance Criteria
Additional information
The text was updated successfully, but these errors were encountered: