使用 PhpStorm 进行 Xdebug 发布请求 [英] Xdebug post requests with PhpStorm

查看:123
本文介绍了使用 PhpStorm 进行 Xdebug 发布请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 PphpStorm 2016.1.php 引擎为 php 7.0.4,xdebug 版本为 2.4.0.我也在使用 ubuntu 16.04.问题是我可以调试每个请求.但是当我想调试 post 请求时, $_POST 全局变量正在变空变量.使用调试模式发布表单可以正常工作,但是当使用 PhpStorm 启用调试时,我看不到 $_POST 变量的数据.我做了一切,但我没有找到解决方案.

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.

推荐答案

docs:

如果您想调试通过网络浏览器启动的脚本,只需将 XDEBUG_SESSION_START=session_name 作为参数添加到 URL.除了使用 GET 参数,您还可以将 XDEBUG_SESSION_START 设置为 POST 参数,或通过 cookie.

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.

你忘记了吗?

这篇关于使用 PhpStorm 进行 Xdebug 发布请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆