Skip to content

Development and Debugging

You can run the Sidecar with SPOTLIGHT_CAPTURE=1 to write the captured data to a file. So for example if any Sentry SDK sends an envelope to the Sidecar, it will be written to a file in the current directory looking like this: application_x_sentry_envelope-1701167447043.txt.

All these files can be put into ./packages/spotlight/_fixtures and used for testing. Also, they can be attached to Github issues to reproduce bugs.

If you run pnpm sample in ./packages/spotlight it will send a sample event to the Sidecar and therefore to Spotlight. All .txt files that are contained in ./packages/spotlight/_fixtures will be sent. This can be very handy when testing Spotlight locally.

To get detailed browser console logs for debugging, open the following URL in your browser while the Sidecar is running:

This will enable advanced debug output in the browser console.

Tip: This is especially useful for inspecting Sidecar behavior.

You can directly inspect the raw envelopes received by the Sidecar using curl:

Terminal window
curl http://localhost:8969/stream -H 'Accept: text/event-stream' --verbose

This command will stream the envelopes as they arrive, allowing you to verify what data is being processed by the Sidecar in real time.