首页 > 解决方案 > 作为开发人员,我如何在 Moodle 中进行调试?

问题描述

我正在研究moodle,尤其是在操纵数据方面。我想分享我作为开发人员在 moodle 中进行调试的经验。愿这将帮助您节省您在谷歌搜索上的时间。

标签: phpmysqldebuggingmoodledeveloper-tools

解决方案


在谷歌上搜索后,我终于找到了关于这个的文档。您可以将其添加到您的 config.php

// Force a debugging mode regardless the settings in the site administration
// @error_reporting(1023);  // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
$CFG->debug = 32767;         // DEBUG_DEVELOPER // NOT FOR PRODUCTION SERVERS!
// for Moodle 2.0 - 2.2, use:  $CFG->debug = 38911;  
$CFG->debugdisplay = true;   // NOT FOR PRODUCTION SERVERS!

// You can specify a comma separated list of user ids that that always see
// debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay
// for these users only.
$CFG->debugusers = '2';

https://docs.moodle.org/23/en/Debugging#In_config.php


推荐阅读