Answer the question
In order to leave comments, you need to log in
Why aren't ajax requests shown in the symfony 2 profiler?
The beginning of the question
Registered in the config:
web_profiler:
toolbar: true
position: bottom
intercept_redirects: false
excluded_ajax_paths: ^/bundles|^/_wdt
class DefaultController extends Controller
{
public function indexAction()
{
$request = $this->get('request');
return new Response(var_dump($request->isXmlHttpRequest()));
}
}
$("#ajax").click(function(){
$.ajax({
type: "GET",
url: "/app_dev.php/admin",
headers: {'X-Requested-With': 'XMLHttpRequest'},
success: function(msg){
alert(msg);
},
error: function(msg){
console.log(msg);
},
});
});
Answer the question
In order to leave comments, you need to log in
Nothing extra is needed. The default setting shows everything. Take a screenshot with open the dev tab where the xmlhttp request left and so that the profiler can be seen
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question