Debugging

From IOU Bahasa
Revision as of 02:40, 13 October 2025 by Iou (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Debugging in Moodle involves several techniques, from enabling built-in debugging messages to using developer tools and logging.

Here is a comprehensive guide on how to debug in Moodle, starting with the essential built-in features.

Enable Moodle's Built-in Debugging

This is the first and most crucial step for any Moodle issue. It forces Moodle to display errors, warnings, and detailed information.

  1. Log in as an administrator.
  2. Go to Site administration > Development > Debugging.
  3. Set the Debug messages dropdown to DEVELOPER. This is the highest level and displays all PHP notices, warnings, and errors.
  4. Check the box for Display debug messages.
  5. Check the box for Show performance information (optional, but helpful).
  6. Save changes.

Once enabled, Moodle will display detailed error messages at the top of the screen (or in the logs) when an issue occurs, often including a stack trace pointing to the file and line number where the problem originated.