Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

debugpress_store_object($object, $title = '', $sql = false)


This function will store any object or value into the DebugPress Tracker, and it will be displayed in the Debugger pop-up window inside the ‘Store’ tab. You can give the stored value a title, and you can mark it as an SQL query. Right now, that is not used, but the next plugin version will attempt to render stored objects marked as SQL as an SQL formatted string for easier readability.


  • $object: object or value to store. This can be anything: single value, array, or object.
  • $title: optional title to associate with the stored value.
  • $sql: boolean value marking the stored value as SQL query string.


For this to work, the function has to be called after the Tracker object is first initialized. The tracker is loaded during ‘plugins_loaded’ action, and it has priority 0. So, to call this function, it has to be called inside the code happening after this moment.

Rate this reference

You are not allowed to rate this post.

Leave a Comment