trace

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 Mozilla's console.log documentation.

Filter examples

The following table lists examples that use the trace snippet:

FilterResult

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.

Last updated