Skip to content

[VarDumper] file and line are not shown when using component standalone #24852

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

Closed
ivoba opened this issue Nov 7, 2017 · 4 comments
Closed

[VarDumper] file and line are not shown when using component standalone #24852

ivoba opened this issue Nov 7, 2017 · 4 comments

Comments

@ivoba
Copy link
Contributor

ivoba commented Nov 7, 2017

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

I noticed that line and file are not shown when using the VarDumper component standalone.
If i see it correct file and line are added in DebugBundle in the DumpDataCollector through a $contextDumper closure.

Wouldnt that fit better into the component so that file and line are shown by default?
Is there anything that makes this complicated?
Or can this be configured when using the component outside of symfony?

When Xdebug is installed the native var_dump also displays file and line.

@ogizanagi
Copy link
Contributor

ogizanagi commented Nov 7, 2017

I extracted it in a dedicated SourceContextProvider in #23831. So if gets merged you can reuse it easily in your own dumper. But perhaps it could also be an option of existing dumpers.

@ivoba
Copy link
Contributor Author

ivoba commented Nov 8, 2017

@ogizanagi that looks awesome.
How could you use it with VarDumper? How should it be invoked?

@nicolas-grekas
Copy link
Member

Closing as this is the expected behavior of the standalone vardumper, and there is work ongoing to package it in a more friendly way already.

@ivoba
Copy link
Contributor Author

ivoba commented Nov 20, 2017

Btw: there is a package that adds the desired functionality for the VarDumper component when used outside of symfony context: https://github.com/morrislaptop/var-dumper-with-context

@remco-pc remco-pc mentioned this issue Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants