I feel your pain. I make a lot of my money maintaining legacy PHP projects, but I&#x27;m hoping to entirely get away from PHP in 2016.<p>It&#x27;s incredibly difficult to fight the &quot;just rewrite it in [some better language]!&quot; reaction whenever I first look at a code base like the one you&#x27;re describing.<p>&gt; <i>trigger_error as a debug mechanism as well</i><p>Yeah... unfortunately that sounds very familiar. &quot;Abuses&quot; is a good word for it.<p>At least with Xdebug, you can use breakpoints instead of &quot;var_dump($whatever); exit;&quot; and you can navigate through your stack trace. No, definitely not as good as Java tooling, though.