Recently I had a problem where because of invalid data in DB some PHP script ran into an infinite recursion on production. We have Sentry added in our system for error log management, but that did not help as there was no error thrown about - PHP just died, with no logs in Sentry or server file logs. It was pretty hard to pinpoint the root cause of the problem when it happened.
After doing some research the only thing I managed to find was that setting xdebug.max_nesting_level
would throw an "Nesting too deep" error. How safe would it be to use this specific xdebug feature in production, if everything else is disabled? Or is there another alternative for catching recursion errors in production?