使用PHPStorm或POSTman的XDebug和RESTful服务器 [英] XDebug and RESTful server using PHPStorm or POSTman

查看:133
本文介绍了使用PHPStorm或POSTman的XDebug和RESTful服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取REST客户端(例如内置在 POSTman )与XDebug一起使用?

How can I get a REST client (such as the one built into PHPStorm or POSTman) to work with XDebug?

在我当前的XDebug设置中,使用PHPStorm和提供的书签我能够使其在Chrome和Firefox中都能使用-但是,一旦我尝试使用POSTman或任何其他REST客户端,我就不知道如何开始使用它.

In my current set-up of XDebug, using PHPStorm and the Bookmarklet provided I'm able to get it working in both Chrome and Firefox - but as soon as I try with POSTman or any other REST client, I can't figure out how to get it started.

干杯.

推荐答案

直到 http://youtrack .jetbrains.com/issue/WI-17031 将被实施,您可以尝试以下方法之一:

Until http://youtrack.jetbrains.com/issue/WI-17031 will be implemented you can try one of these approaches:

  1. 配置xdebug(通过编辑php.ini)以尝试调试每个 php脚本(xdebug.remote_autostart = 1)

将xdebug会话开始参数添加到实际URL(XDEBUG_SESSION_START={{KEY}}- http://xdebug. org/docs/remote ),例如:?XDEBUG_SESSION_START=PHPSTORM

Add xdebug session start parameter to the actual URL (XDEBUG_SESSION_START={{KEY}} -- http://xdebug.org/docs/remote ), for example: ?XDEBUG_SESSION_START=PHPSTORM

将xdebug cookie作为标题之一(由 bookmarklet设置的或浏览器扩展程序)

Pass xdebug cookie as one of the headers (the one which is set by bookmarklet or browser extension, for example)

要使其正常工作,请先确保已激活电话手柄"图标(Run | Start Listen for PHP Debug Connection).

For this to work -- make sure that "phone handle" icon is activated (Run | Start Listen for PHP Debug Connection) in advance.

这篇关于使用PHPStorm或POSTman的XDebug和RESTful服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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