3

Hi my question is that we can view the output of symfony dump() function with normal http request, but can we view the output with ajax request?

2 Answers 2

10

U can check all dump data from standart symfony profiler toolbar.

First, use dump() function as u usually do:

dump(array('Some key' => 'Some value'));

Then, open app_dev.php symfony enviroment, and do your ajax action. Look at profiler toolbar on request section: enter image description here

Click on ajax action profile id. (460769 in example above) Then look at debug section in profiler enter image description here

Sign up to request clarification or add additional context in comments.

Comments

3

Open the developer tools* in your browser before you make the request on your page. Click on the networks tab then perform the action that makes the request. Click on the request (circled in the chrome example below) and select the Preview tab and you'll see all the output.

* Using Chrome open devtools with the keyboard: Ctrl+Shift+i or from the menu > More Tools > Developer Tools

Here's an overview of Chrome's devtools. You can breeze through the videos in < 1hr.

Here's a picture:

enter image description here

3 Comments

i was asking about Symfony\Component\VarDumper\VarDumper::dump() output, not an ordinary request.
@AhmedAli make sure you follow your last dump() with die;
we can use now dd() dump and die

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.