Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45049

Make debugging() useful in background scripts such as styles(_debug).php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.5, 2.6.2
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      1/ execute phpunit tests
      2/ create a new script with following code and verify the error log output looks nice

      <?php
      define('NO_DEBUG_DISPLAY', 1);
      require('config.php');
      debugging('grrr');
      die;
      

      Show
      1/ execute phpunit tests 2/ create a new script with following code and verify the error log output looks nice <?php define('NO_DEBUG_DISPLAY', 1); require('config.php'); debugging('grrr'); die;
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w16_MDL-45049_m27_debugging

      Description

      Debugging calls in those scripts do not generate any output, and using error_log() instead is not appropriate as they cannot be unit tested.

      We need to be able to see the output somehow, somewhere for those call to have more value than just being unit testable.

      Related to: MDL-44936

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14