[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-css v2.1.0 Update to oik-css v2.1.0 for the ability to style CSS and GeSHi output in documentation. ...
oik-types v2.3.0 Update to oik-types v2.3.0 for improved control over sort order on archives ...
UK-tides v3.1.0 UK-tides v3.1.0 now supports several additional ports. It's built with latest wp-scripts and shared libraries and tested with WordPress 6.1. ...
oik v4.8.2 Upgrade to oik v4.8.2 if you installed oik v4.8.1 from wordpress.org and found that the blocks were missing from the editor. ...
sb-chart-block v1.1.0 sb-chart-block v1.1.0 now uses chart.js v3.9.1. Tested with WordPress 6.0.1 and Gutenberg 13.8.2 ...

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-2023. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.1.1. PHP: 7.4.33. Memory limit: 768M