问题
I am using PphpStorm 2016.1. The php engine is php 7.0.4 and xdebug version is 2.4.0. I am using ubuntu 16.04 as well. The problem is that I can debug every request. But when I want to debug post request, $_POST
global variable is getting empty variable. With debug mode posting a form is working but when enabling debug with PhpStorm I can't see $_POST
variable's data. I did everything but but I did not find the solution.
回答1:
docs:
If you want to debug a script started through a web browser, simply add XDEBUG_SESSION_START=session_name as parameter to the URL. Instead of using a GET parameter, you can also set XDEBUG_SESSION_START as a POST parameter, or through a cookie.
Didn't you forget this?
来源:https://stackoverflow.com/questions/37630862/xdebug-post-requests-with-phpstorm