I'm attempting to debug Moodle 2.9.3 in Visual Studio using a PHP IDE plugin called VS.Php 3.5 for Visual Studio. The IDE plugin works, I can and have debugged Moodle before with it but over the course of the last few months I've been updating the site without doing any additional development work so I've just been pulling down the latest and greatest and installing on the server. Now I want to develop again. But also I want to use the current site as the starting point. So I backed up the site, rebuilt a local database for me to use during development. Then I built a new development site to work with and then copied all the Moodle files over to that project. I made my path adjustments that were necessary to point Moodledata folder to the right path, so forth and so on.
Then I ran the site and encountered an error that I cannot find the source of.
"Syntax error, unexpected '['"
Because I am able to debug, I have traced the problem down to line 28 in /course/lib.php where it's referencing the file /lib/filelib.php. Here is an excerpt:
defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir.'/filelib.php'); <-------- error occurs here
Naturally I thought perhaps somehow there was an additional left bracket in that file but after a thorough examination I cannot find anything wrong with the file. The error message is strange to me. I've done some searches for this error and haven't found anything pertaining to my situation.
Additionally I placed breakpoints in that file and none of them are ever met. Even on the first line of code. I don't think /lib/filelib.php is loaded yet. Or perhaps it is loaded but not compiled so the debugger can step through? Somewhere when that file is loaded or executed that's where the trigger is. But again, the file looks fine. In fact it is the same file on our server with our public site. The only real difference is upgrades have occurred over the past few months that necessitated me re-copying files to a development location to perform debugging.
Does anyone have any clue what might be going on?