Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX][Profiler][Doctrine] Show where the query was made #18235

Closed
MacDada opened this issue Mar 19, 2016 · 7 comments
Closed

[DX][Profiler][Doctrine] Show where the query was made #18235

MacDada opened this issue Mar 19, 2016 · 7 comments
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Feature WebProfilerBundle

Comments

@MacDada
Copy link
Contributor

MacDada commented Mar 19, 2016

It is sometimes tedious to find what caused the exact query, visible in Doctrine panel, to be run.

It would be cool if next to Explain query button there was a Show stacktrace button. Even if it would be visible only for people with Xdebug enabled.

@javiereguiluz javiereguiluz added Feature WebProfilerBundle DX DX = Developer eXperience (anything that improves the experience of using Symfony) labels Mar 20, 2016
@PeterFour
Copy link

The only way to do this was to use Blackfire for me and it was not that much efficient time-wise (but still better than crawling all the code). Would be really usefull to debug some bad or massive queries

@MacDada
Copy link
Contributor Author

MacDada commented Mar 22, 2016

it was not that much efficient time-wise

@PeterFour It could be optional: only collected when a certain cookie is present.

@PeterFour
Copy link

@MacDada Well I know I was just saying that even using Blackfire it was not perfect so having a Stacktrace would be probably easier to use, especially because it's already using the Doctrine Profiler Panel

@fabpot
Copy link
Member

fabpot commented Mar 22, 2016

I've not checked but this is part of DoctrineBundle, not Symfony, right?

@MacDada
Copy link
Contributor Author

MacDada commented Mar 22, 2016

I've not checked but this is part of DoctrineBundle, not Symfony, right?

@fabpot You're probably right.

@MacDada
Copy link
Contributor Author

MacDada commented Mar 22, 2016

@MacDada MacDada closed this as completed Mar 22, 2016
@sustmi
Copy link
Contributor

sustmi commented Dec 6, 2019

Just for reference, this feature is already available in Doctrine bundle from v1.11.0: https://symfony.com/blog/new-in-doctrinebundle-1-11-0#store-backtraces-when-profiling-queries (PR: doctrine/DoctrineBundle#954) .

You just need to enable it by setting doctrine.dbal.profiling_collect_backtrace: true (I set it to '%kernel.debug%' instead because it is the default value of profiling setting).

Web search got me here and from this conversation it looks like it may not be available yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Feature WebProfilerBundle
Projects
None yet
Development

No branches or pull requests

5 participants