privacy-sandbox-dev-support icon indicating copy to clipboard operation
privacy-sandbox-dev-support copied to clipboard

How to check if debug mode is enabled in bidding logic?

Open profgrammer opened this issue 9 months ago • 1 comments

Hi, There are a couple of places where we call contributeToHistogram and contributeToHistogramOnEvent in our bidding logic. These calls are guarded by some experiments and we want to have debug mode enabled in all of the calls. In case more than one experiment is enabled we end up calling enableDebugMode more than once which crashes the script.

  • Is there any way to know if debug mode is enabled in the privateAggregation object?
  • Is this a best practice to follow? If not how can we best implement this case?

Thanks in advance!

profgrammer avatar May 25 '24 10:05 profgrammer