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

[Console] Activate the profiler in the commands #21141

Closed
maidmaid opened this issue Jan 2, 2017 · 5 comments
Closed

[Console] Activate the profiler in the commands #21141

maidmaid opened this issue Jan 2, 2017 · 5 comments

Comments

@maidmaid
Copy link
Contributor

maidmaid commented Jan 2, 2017

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version last

Would it be interesting to be able to activate the profiler in the commands? Maybe something like this:

$ php bin/console app:do:something --enable-profiler

// do something 

Profiler token: http://localhost:8000/_profiler/b50ac4
@stof
Copy link
Member

stof commented Jan 2, 2017

The issue is that the Profiler is tied to profile a Request currently, and there is no Request in the CLI (unless you do CLI over HTTP of course).
So this would require a full rewrite of the profiler first, to decouple it from HttpFoundation

@fabpot
Copy link
Member

fabpot commented Jan 2, 2017

@stof is write when he says that the profiler is tied with HTTP requests. Rewriting the profiler would not help as anyway most panels needs a request. So, I'm closing this one as it would mean developing a new profiler for CLI applications.

@kaznovac
Copy link
Contributor

hi @fabian, i think this would be a great addition to the symfony dx (i.e. profiled http-client requests and doctrine queries issued by a command would be of immense help in a development process)

any chance you've changed your stance on this? as per comment: #39114 (comment)

these issues seem related:

thanks

@adrienbrault
Copy link
Contributor

Hi,

The profiler and web toolbar are really valuable tools, but the lack of cli/command/messenger support makes debugging much harder in some scenarios. For example debugging failing functional tests (running through a cli tool/command like behat or phpunit) is quite complicated.

I have created 2 bundles that help bring the profiler/toolbar experience to the terminal:

Native support would be really nice :)

@kaznovac
Copy link
Contributor

kaznovac commented Jun 8, 2021

@adrienbrault amazing work, thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants