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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5.5, 2.6.2
    • 2.5.6, 2.6.3
    • Libraries
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • w16_MDL-45049_m27_debugging
    • 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;

    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

              skodak Petr Skoda
              fred Frédéric Massart
              Frédéric Massart Frédéric Massart
              Dan Poltawski Dan Poltawski
              Andrew Lyons Andrew Lyons
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/May/14