Hi,
I finally could build my user related debug mode tool without any need to modify the config.php or other places. Now it is triggered by the new hook function "tool_userdebug_after_config" which is great 👍.
If someone could try and give me some feedback, it would be great.
https://moodle.org/plugins/view.php?id=462
Best regards
Andreas