As you know var_dump() in addition to value show its data type and length.
Is there any way to log its output to
You can dump JavaScript to the console by putting a console.log() in a script tag:
So if you do a php dump in there...
You just need to be careful about ' and " in the var_dump breaking your JavaScript. In this example it will be ok because the HTML would be:
Just remember the php is processed then put in the JavaScript. You could also dump it to a comment:
Then you can view source, or inspect element.