LogoLogo
About GitLabAcceptable Ads
  • Getting Started
  • Browser Ad-Filtering Solution
    • Features
    • Getting Started
      • Quickstart
      • Integrate the Solution
      • Set up user counting
    • Guides
      • User counting
      • Configure Solution settings
      • Run separate instances of the filtering engine
      • Update the Solution
      • Understand the snippets library
      • Create a filter list
      • Testing
    • Advanced
      • Services and classes
      • Sitekey
      • ADRs
      • Frame hierarchy
  • Snippets
    • Snippets Overview
    • Behavioral Snippets
      • abort-current-inline-script
      • abort-on-property-read
      • abort-on-property-write
      • abort-on-iframe-property-read
      • abort-on-iframe-property-write
      • array-override
      • cookie-remover
      • freeze-element
      • json-override
      • json-prune
      • override-property-read
      • prevent-listener
      • replace-fetch-response
      • replace-xhr-response
      • simulate-mouse-event
      • skip-video
      • strip-fetch-query-parameter
    • Conditional Hiding Snippets
      • hide-if-canvas-contains
      • hide-if-contains
      • hide-if-contains-image
      • hide-if-contains-similar-text
      • hide-if-contains-visible-text
      • hide-if-contains-and-matches-style
      • hide-if-has-and-matches-style
      • hide-if-labelled-by
      • hide-if-matches-computed-xpath
      • hide-if-matches-xpath
      • hide-if-matches-xpath3
      • hide-if-shadow-contains
    • Debugging Snippets
      • debug
      • log
      • profile
      • trace
    • Performance Snippets
      • race
    • Snippets Support by Platform
    • Node Highlighting
    • Accessing shadow DOM elements
  • Working with filters
  • DATA AND PRIVACY
    • Data collection at eyeo
Powered by GitBook
On this page
  • Filter examples
  • Debugging

Was this helpful?

Edit on GitLab
Export as PDF
  1. Snippets
  2. Debugging Snippets

trace

Last updated 2 years ago

Was this helpful?

The trace snippet logs arguments in the document rather than in a content script.

You can use the trace snippet for testing and debugging. For example, with the trace snippet, you can verify that snippet injection into a document works without errors.

The trace snippet accepts the same arguments as the console.log() method. For more information, view .

Filter examples

The following table lists examples that use the trace snippet:

Filter
Result

trace OK

Logs OK to the console.

trace Hello, world!

Logs Hello, world! to the console with two parameters.

trace `Hello, world!`

Logs Hello, world! to the console with one parameter.

Debugging

In debug mode, the string DEBUG precedes each snippet logged by trace.

Mozilla's console.log documentation