[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog
You are here: Home / WordPress plugins from oik-plugins / FREE oik plugins / oik-bwtrace – debug trace for WordPress / An introduction to problem determination with oik-bwtrace – debug trace for WordPress

An introduction to problem determination with oik-bwtrace – debug trace for WordPress

Problem determination is a personal experience. It’s about discovery.
You notice something’s wrong and use available tools to help you find out what’s going wrong.
For highly interactive debugging you can use a PHP debugger. But there are times when you can’t, or don’t want to, use a PHP debugger. And there are situations where existing logging and tracing facilities don’t provide enough information in the area you’re investigating. So you need to obtain output that shows the values of things, with some contextual information to help you identify when and where the code was invoked. You often introduce new logic into your code that helps you report on the state of processing. Sometimes your new logic alters the results returned to the browser and can appear to make things worse before you’re able to make them better. That’s where the oik-bwtrace plugin fits in. Instead of coding a load of echo statements, print_r()s and/or var_dump()s, along with a smattering of debug_backtrace() calls I use two fairly advanced APIs; bw_trace2() and bw_backtrace(). The output they produce is written to trace files which I can browse in a separate window or tab. If I need more information I add some trace calls and run the output again. When satisfied with the results I can either remove the trace calls, comment them out or leave them in place with a trace level set to BW_TRACE_DEBUG. In this short video I explain the oik-bwtrace solution. I use it in my plugin development in preference to using a PHP debugger. You may also find it useful in your own development environment, or when performing problem determination. There are other tools available. Many of them only work on the front-end. oik-bwtrace can be used to trace every transaction: AJAX, CRON, XMLRPC, etcetera.

Additional notes

  • Well defined trace points can assist formal problem determination
  • Too much tracing can affect performance
  • A well written trace routine should not affect the results obtained
  • It’s a pity, but sometimes things can still go wrong when certain levels of tracing are activated.

Published: September 4, 2015 | Last updated: December 1, 2020

Information

Component:
  • oik-bwtrace – debug trace for WordPress
Letters: A

Recent plugin updates

oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: oikplug@oik-plugins.com

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2025. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins

WordPress version: 6.8.3

Gutenberg version: 21.7.0

PHP version: 8.2.29