Debugging: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
<p>Debugging in Moodle involves several techniques, from enabling built-in debugging messages to using developer tools and logging.</p> | <p>Debugging in Moodle involves several techniques, from enabling built-in debugging messages to using developer tools and logging.</p> | ||
<p>Here is a comprehensive guide on how to debug in Moodle, starting with the essential built-in features.</p> | <p>Here is a comprehensive guide on how to debug in Moodle, starting with the essential built-in features.</p> | ||
<h3>Enable Moodle's Built-in Debugging</h3> | |||
<p>This is the first and most crucial step for any Moodle issue. It forces Moodle to display errors, warnings, and detailed information.</p> | |||
<ol> | |||
<li>Log in as an administrator.</li> | |||
<li>Go to Site administration > Development > Debugging.</li> | |||
<li>Set the Debug messages dropdown to DEVELOPER. This is the highest level and displays all PHP notices, warnings, and errors.</li> | |||
<li>Check the box for Display debug messages.</li> | |||
<li>Check the box for Show performance information (optional, but helpful).</li> | |||
<li>Save changes.</li> | |||
</ol> | |||
<p>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.</p> | |||
Revision as of 01:53, 13 October 2025
Debugging in Moodle
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.
- Log in as an administrator.
- Go to Site administration > Development > Debugging.
- Set the Debug messages dropdown to DEVELOPER. This is the highest level and displays all PHP notices, warnings, and errors.
- Check the box for Display debug messages.
- Check the box for Show performance information (optional, but helpful).
- 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.