Search code examples
symfonyvar-dump

symfony VarDumper show file and line


When using the VarDumper function dump() in a symfony project the file and line of where dump() was called is shown.

When using the VarDumper component standalone file and line is not shown.

I guess in Symfony it's somewhere configured in the DebugBundle.

Where does this happen exactly and how can I achieve this with the standalone component?

Update: I issued a ticket https://github.com/symfony/symfony/issues/24852 and this shows the feature is indeed not included in the component but probably planned for the next releases.


Solution

  • try this component: https://github.com/morrislaptop/var-dumper-with-context

    results: https://www.screencast.com/t/d7IzVtcO