aw2_debug

This shortcode is used to debug the flow of execution. All shortcodes wrapped under aw2_debug shortcode will output their debug information during execution. It can throw very detailed step by step execution information of various shortcodes.

Attributes:
  • main:
    start | stop

    ‘start’ indicates the start of debugging process, which will continue till it encounters aw2_debug shortcode with ‘stop’.

  • when:
    admin | request

    ‘admin’ can be set to indicated that debug information should only be shown to loggedin users who can manage options.

    ‘request’ if set it indicates that debug information is to be shown when ‘debug’ parameter is set in the query string of the page.

    If nothing is set, it shows the debug information to everyone

  • output:
    screen | console | log

    aw2_debug defaults to screen as output mode, if ‘console’ is set it shows the debug information in the browser console. If ‘log’ is set, it will create ‘log.html’ file in the ‘uploads’ folder of the website and write the debug information to this file.

  • param:

    If a ‘param’ key is given it’s value will be shown. This is useful when you are debugging in a live server.

Examples:

aw2_debug is usually used in this way

You can also use

Another useful usecase of aw2_debug is

This allows you see the fully resolved output of this block only, without showing the overall debug information