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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5.6, 2.6.3
    • 2.5.5, 2.6.2
    • 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;

      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

            skodak Petr Skoda
            fred Frédéric Massart
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.