javascript - PhpStorm how I debug php file when request is initiated from JS? -


i have no issue debugging php files independently when want see request server side(php) client side locally, can't. try putting breaking point inside php file, debugger stop on break point when debugging project using chrome.

my php looks that:

<?php     $response = "super"  <--this line has breaking point     echo $response 

client side sending request server side looks that:

    function ajaxrequest(url, data, requestmethod)     {         $.ajax({             type: requestmethod,             url: url,             data: {                 json: data             },             success: responsehandler         });     } 

when run project in debug window in chrome url: http://localhost/jason/index.html?xdebug_session_start=19067

and in phpstorm debugger see waiting connection ide key 19067 chrome displaying code if request been sent , response has been received without stopping in php break point.

after start php debugging, try right click in browser window , select inspect in phpstorm. should activate js debugger in storm alongside php debug.

of course you've installed chrome extension phpstorm: https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji

hope helps.

[later edit] ah, , deactivate javascript minifying may have!


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -