Closed dmitriim closed 1 year ago
This happens because Moodle sets PHP errors earlier than calls "after_config" hook. see https://github.com/moodle/moodle/blob/master/lib/setup.php#L702
Not sure about the best way to fix it. We can simply hardcode setting PHP debugging in the plugin the same way as it's in core. But not sure if this is the best solution. @golenkovm @brendanheywood @Peterburnett @keevan Any ideas?
I was able to get it working. The missing bit was forcing debugdeveloper to 1. So following config works as expected.
["CFG,debug,32767","CFG,debugdisplay,1","CFG,debugdeveloper,1","js_header,console.log('Works');"]
I would reopen this and turn it into a documentation task.
@Peterburnett came up with an idea to have a specific experiment config for enabling debugging.E.g. DEBUG,1
I have created https://github.com/catalyst/moodle-tool_abconfig/issues/59
steps to replicate: