Just got an annoying error that said Xdebug only allowed 100 levels of function nesting. Well, actually, the error didn’t say anything about the limitation being Xdebug, so I spent quite awhile trying to track down the issue. It turns out that PHP doesn’t specifically limit function nesting (although you do have a performance and memory issue if you go too deep), but I’m building a complex page and need lots of surrounding permission functions.
In any case, to fix the issue, you need to change the Xdebug option xdebug.max_nesting_level to a larger number. This then goes into the php.ini file that is controlling your current session. Don’t forget to reboot.