PHP error in the panel: How do I find the underlying source file?

I’m deep into refactoring an old Kirby 3 site to make it Kirby 5 ready so I’m stumbling across a lot of outdated stuff and broken things. If I get a PHP error displayed in the panel, how do I find the actual source of the problem to fix the underlying issue?

The server responses seem to only include the message as well, but no file or line references. So it’s not just hidden in the output. Any ideas where to look or how to debug this?