I'm a newbie and I'm trying to learn more about Processwire so I've setup XDebug + PHPStorm to get some real time debugging happening.
I've noticed that no matter where i put a breakpoint in any of my php modules, it seems to return the following error.
Error: __debuginfo() must return an array (line 55 of /Users/FrancisChung/site/Test/templates/head.inc)
This error message was shown because you are logged in as a Superuser. Error has been logged.
I was wondering if fellow Processwire users have a similar setup, and was successful in getting debugging going.
I've also read this forum post:
I'm also aware there's an issue with XDebug and Processwire:
So I've managed to get XDebug working partially with PHP7.
It seems that XDebug throws the __debugInfo must return an array error on any breakpoints where the php code is not a class definition. If I put breakpoints in any classes, debugging works fine.
Also, I don't know whether it's a different issue but I had to set break on first line in PHPStorm to get the debugger start up properly. Perhaps there's some bootstrapping going on with this option that isn't happening elsewhere.
I've used the same config for PHP 5.5 and everything works as previously.
So until they fix this issue (which was allegedly fixed in Xdebug 2.4.1), best to put breakpoints only in classes.
P/S If anyone needs setup instructions, here's some helpful guides.
More info on __debugInfo