Saving of Incoming requests - so can easily resend them when debugging

Hi there,

I am a deep lover of PHPStorm, its a lovely awesome product!

The other day, I found a nifty feature in firefox - by right-clicking a request in the web developer console, I can choose: "Resend" and that request will send itself again to the the phpstorm debugger when debugging is turned on.

This is a major time saver, as I dont need to always click on the steps in the UI just to get a request sent again.

I really cool feature that I'd love to have in PHPstorm, if there was a way to save incoming requests - so that they could be easily replayed.  This would help my workflow, as I wouldnt have to always flip back to firefox and click resend..

Does this feature already exist?

I noticed and have checked out the RESTtool and i see it has an import/export option.  It would be great if this tool would allow the saving of the incoming request.

Please let me know if this feature already exists in STORM, or a plugin

Thanks community!

4 comments

Hi there,

"Resend" and that request will send itself again to the the phpstorm debugger when debugging is turned on. "Resend" and that request will send itself again to the the phpstorm debugger when debugging is turned on.

Wrong. You seems to be having no idea of how it actually works.

Request is sent to web server and not to PhpStorm directly. Yes, PhpStorm has built-in simple web server  and if your page is served by it the request technically will be served using PhpStorm .. but still -- request is sent to web server.

When request is getting processed by PHP, the xdebug looks for debug markers (GET/POST parameters, COOKIE .. or whatever) and acts accordingly (either attempts to debug or keep executing as is).

I noticed and have checked out the RESTtool and i see it has an import/export option.  It would be great if this tool would allow the saving of the incoming request.

Therefore the above statement does not make much sense, as debug or not is decided by actual request and xdebug settings.

Therefore #2 -- you can use it to send such requests.

0

Thanks for your reply Andriy Bazanov,

haha, I'll be more clear - YES - I know it doesnt go to PHPSTORM, and that it goes to the webserver first - I am not that green!

The request first goes to the Webserver (in my case my local apache install) but my XDebug picks it up, and launches PHPStorm since I have previously pressed the "Start Debugger" bookmarklet.

What I was asking about is if that "Incoming request" along with all its beautiful little cookies, headers, parameters HTTPVerb type etc, could be "Saved" in say, the REST tool
so that it could later be replayed...

does that make more sense?

Kind regards, and thanks again for your speedy response

Fire

0

REST Client only sends requests -- it does not receive them. It can save (export) current request and re-use it later (which you know already).

But you can manually assemble such request with all required fields by copying them from browser (headers, GET & POST data -- it's all available) and save it for resending it later.

  • If browser's Network Tools (or whatever the proper name for that is) can copy whole request into clipboard .. then feel free to submit new Feature Request ticket on Issue Tracker to simplify creating of such requests: http://youtrack.jetbrains.com/issues/WEB?q=%23{REST+Client} (check for existing tickets first)
  • If it cannot -- then you have to build such request manually.


If you talking about assembling such request (in REST Client or whatever) based on data from xdebug connection .. then it is very specific request with very low usage and unlikely to be implemented IMO (IMO only) . In any case -- Issue Tracker is located here: http://youtrack.jetbrains.com/issues/WI where you can describe your desired functionality in details.

0

Thanks Andriy Bazanov,

Yes, before submitting it as a feature I wanted to discuss it here incase it already exists.
But that is exactly what I want - I want some way of taking a request (all its cookies etc),  and saving it in PHPSTORM (perhaps as a new feature of the REST tool), so that THAT request can be easily replayed in PHPStorms debugger, instead of having to switch back to my browser each time.

I'll submit it as a feature request, and update this post

0

Please sign in to leave a comment.