php - 作为开发人员,我如何在 Moodle 中进行调试?
问题描述
我正在研究moodle,尤其是在操纵数据方面。我想分享我作为开发人员在 moodle 中进行调试的经验。愿这将帮助您节省您在谷歌搜索上的时间。
解决方案
在谷歌上搜索后,我终于找到了关于这个的文档。您可以将其添加到您的 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';
推荐阅读
- html - 分离两个“div”元素
- python - 第 7 行,IndexError:列表索引超出范围
- c# - 为什么 VS 按字母顺序对 XML 类子项进行排序,以及如何避免这种情况?
- docker - 无法访问 docker 上 gin 服务的 localhost(无法访问此站点)
- java - “名称不匹配”打印,但在这里打印 5 次
- html - 如何创建一个响应式 div 里面有一个正方形和一些文本
- python - 在 Python 3.7、Django3.1.1、Apache/2.4.46 (cPanel) 中出现错误:AttributeError: 'module' object has no attribute 'lru_cache'
- python - 如何在networkX中合并重复节点而不丢失边缘
- reactjs - React Material UI 拆分按钮对齐
- python - 通过python中的自定义规则从字典列表中创建有序列表