silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
719 stars 820 forks source link

Add an SQL comment in dev mode showing where queries were executed #11064

Closed GuySartorelli closed 5 months ago

GuySartorelli commented 7 months ago

It would be really useful when debugging queries (e.g. using ?showqueries=1) to see where those queries were executed from.

This should only be enabled in dev mode - though I could see an argument for having some optional query parameter similar to showqueries to enable it, either instead of or in addition to the dev mode check.

PRs