[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

sb-chart-block v0.3.0 sb-chart-block v0.3.0 now uses Chartjs v3.1.0. It also delivers two more Colour palettes. ...
sb-chart-block v0.2.0 sb-chart-block v0.2.0 has been updated for hosting on WordPress.org. The code now uses improved color palette selection using palette.json. ...
oik-weight-zone-shipping v0.2.4 oik-weight-zone-shipping v0.2.4 contains a fix to calculate a handling fee as a percentage of the total cart cost. ...
oik-types v2.0.0 oik-types v2.0.0 contains a fix for a problem noted with Gutenberg Navigation blocks. Existing menus were being loaded in the wrong order.  ...
oik-css v1.2.0 

Upgrade to oik-css v1.2.0 for PHP 8 support. Tested with WordPress 5.7

 ...

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: [email protected]

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


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