Skip to content

[VarDumper] Can't find variable: Sfdump JS Error #48039

@PhilETaylor

Description

@PhilETaylor

Symfony version(s) affected

5.4+

Description

On the Logs page of the Symfony Profiler when an exception has been thrown, the dump of traces creates a javascript console error

How to reproduce

So.... To replicate create a demo app with Symfony 5.4

composer create-project symfony/symfony-demo mySymfony54 1.8.0
cd mySymfony54
symfony serve
# Visit http://127.0.0.1:8000/en/blog/ to confirm its working
# Edit BlogController.php and throw an \Exception('test') in the index method
# Visit http://127.0.0.1:8000/en/blog/ to confirm you see the exception 
# Click the toolbar at the bottom to get to the Symfony Profiler
# Click LOGS in the left menu 
# Check console.log 

see console.log:

Screenshot 2022-10-29 at 00 14 52

Click to open the error message and see overlapping text and no pretty-ness.

Screenshot 2022-10-29 at 00 15 10

Once this PR is applied you then can repeat and you will see no console.log error message and you will see a pretty output like:

Screenshot 2022-10-29 at 00 16 24

Possible Solution

I attempted #48038 but that was wrong and reverted good work by @nicolas-grekas years ago - sorry, I failed.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy