Debugging

Blackfire is built for code performance optimization. Hooking deep into PHP, it enables developers to know exactly which code is executed, when, and how much resources it consumes. This opens doors to more than performance optimization: debugging.

By default, Blackfire prunes the least significant calls in the profiled code, and anonymize SQL queries and HTTP calls (arguments, usernames, passwords, ...) before data are sent to ours servers (see our privacy and confidentiality documentation).

But the data we remove for profiling and privacy are potentially highly valuable when in a debug session. The Debug add-on is built to let developers disable pruning and anonymization for specific requests!

Note

This feature is available as an optional add-on to Profiler, Premium and Enterprise subscriptions<pricing>.

In order to disable pruning and anonymization, check the Disable pruning and annonymization box in the browser extension, or use the --debug option if creating profiles with blackfire curl or blackfire run.

/docs/debug-addon.png

Profiles generated with deactivated pruning and anonymization will:

  • show all function/method calls executed in the profiled code;
  • show SQL arguments in the SQL queries list, instead of question marks.

Note

As per our terms of use<terms-of-use> please ensure that you never send any personal or sensitive information to Blackfire while profiling non anonymized requests.

Additional notes:

  • There is a known limitation for prepared SQL statements. Arguments will never be collected. Only columns names will be;
  • This feature does not affect/add more data on the timeline, it only does on call-graphs;
  • Using this feature automatically disables aggregation. The profile will be executed only once instead of getting the average of 10 samples.