Updating legacy php 5 code to php 7 / moodle 3.5

Re:

by Marcus Green -
Number of replies: 6
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Looks good, by the way If you have the debugger set up you can get the code to break and then call arbitrary function in it to see what the result it. I was doing that only yesterday with various $DB->get_blabla calls.
In reply to Marcus Green

Re:

by Dan Baker -
Thanks for the tip. I was going to ask what other tools do you use. I see in moodle 3.7 there is the ability to log SQL queries but not in 3.5 :

$CFG->dboptions = array (
//'logall' => true,
'logslow' => 5,
'logerrors' => true,
);

This is what I am currently doing :

xdebug
debug on in moodle
var_dump
print_r
tail -f /var/xdebug.log
tail -f /var/log/apache2/error.log


Is there anything else I can use ?
In reply to Dan Baker

Re:

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You are ahead of me, tail -f/var/xdebug.log looks like a good idea
(this is stuff for the dev wiki I think)
Average of ratings: Useful (1)
In reply to Marcus Green

Re:

by Dan Baker -
Ok will check the wiki . tail -f is really good for seeing the messages going into the log in real time.

Might have some more questions and will start new threads.
In reply to Dan Baker

Re:

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Actually I meant you could add it to the wiki. Anyone can edit it and update it. I think you need to login separately to the forums. Places where it might go are
https://docs.moodle.org/dev/Setting_up_development_environment
or somwhere here
https://docs.moodle.org/dev/Category:Developer_tools
It would be really cool if you were to add a bit of text and post the link here.