0

Option "Reload page in built-in preview" does not work, no matter if I choose "On save" or "On change" (need this one). Pass to option: Settings -> Tools -> Web Browsers and Preview (the option is in bottom)

enter image description here

As you see in image below, I echoed 2 five times changes still didn't appear on preview, that's why need the reload option to get working.

enter image description here

Deployment settings

enter image description here

enter image description here

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • 1) What kind of file are you trying to preview? Show more details on that. 2) Does the preview works at all (e.g. when invoked manually)? – LazyOne Aug 06 '22 at 13:00
  • @LazyOne Problem with preview is in php files: preview doesnt update when i change code, so preview needs to be closed and then opened again to see result. Example in added by me to post second image. But it is fine with just html files, preview updates every change in css or other thing (and the option in settings, that makes preview update, doesnt work - the main question of post) – RidddleWrong Aug 07 '22 at 18:10
  • It works for me (On Save) if I have no Deployment entry marked as Default (so PhpStorm is launching PHP's web server to handle that). But if I have it configured (even if it's "In Place" type) and it web requests are handled by my IIS, then it does not work indeed. No clues on why. – LazyOne Aug 07 '22 at 18:25
  • Change the setting, then restart PhPstorm, that sometimes does the trick. – Grumpy Aug 07 '22 at 19:02
  • @Grumpy It was the first thing to do – RidddleWrong Aug 09 '22 at 16:01
  • @RidddleWrong So what are your deployment settings? – LazyOne Aug 09 '22 at 22:40
  • @LazyOne added to post as asked – RidddleWrong Aug 12 '22 at 10:57
  • @RidddleWrong Try removing Web server URL. This should force the IDE to use built-in web server for Preview where reload works. – LazyOne Aug 12 '22 at 11:15
  • @LazyOne in that case it writes 502 Bad gate way, I removed it fully, and then removed only after http//: , result 502 Bad gate way – RidddleWrong Aug 12 '22 at 20:39
  • @RidddleWrong In such a case I do not have any other suggestions (based on the info at hands). – LazyOne Aug 12 '22 at 21:37

1 Answers1

1

The Reload page in built-in preview feature only works for the PhpStorm built-in web server.
When you create a default deployment configuration with Web server URL specified, PhpStorm renders it through the remote server.

As a workaround, remove the Web server URL and configure a local PHP interpreter at Settings | PHP. At the moment, you probably don't have it configured and get the 502 error because of that.

Related request on our tracker: WI-60573

Eugene Morozov
  • 2,790
  • 1
  • 10
  • 17