Page 1 of 1

Can't debug PHP projects

PostPosted: November 9th, 2017, 7:48 pm
by pf1gura
I am not able to debug or run PHP apps with built-in server. Fresh install of VS2017 and PHP Tools. It configured IIS Express and PHP on first run. I am able to run APS.NET apps with built-in server.

Error I am getting while running web apps:
Code: Select all
This page isn’t working

localhost is currently unable to handle this request.
HTTP ERROR 500


Also when I try to run console apps it crashes.

Screenshots attached.

Re: Can't debug PHP projects

PostPosted: November 10th, 2017, 2:22 pm
by Miloslav Beno
Hello,

That's quite strange, PHP just crashed for some reason. Could you try to use another PHP version to see if there's some issue with that particular instance?

My tests with PHP 7.1 couldn't replicate this.

Thanks

Re: Can't debug PHP projects

PostPosted: November 11th, 2017, 1:35 am
by pf1gura
Thanks for reply. Sat on this one whole day today. I installed few different versions of PHP through Microsoft Web Platform Installer, as well as I manually installed and configured few versions from php.net and it still acted the same way. I tried it on my virtual machine with newest Windows Insider Preview and everything worked fine. So decided to format my laptop and do a clean installation of Windows (Fall Creators Update). First thing I did after was installing newest VS2017 and unfortunately I still got the error. What version of Windows are you on?

Re: Can't debug PHP projects

PostPosted: November 11th, 2017, 9:25 pm
by pf1gura
I've played with it today and it turns out the problem is storing my project files in OneDrive. If I create project anywhere else everything works just fine. I know Visual Studio has problems with OneDrive Files on Demand but I have those turned off. They fixed something in VS17 version 15.5 but it's not out yet. Will let you know if it changes something when it's out eventually.

Re: Can't debug PHP projects

PostPosted: November 13th, 2017, 2:02 pm
by Miloslav Beno
Hmm, VS shouldn't have much of a inpact on php.exe, it's separate process. So it seems it's general problem with onedrive. I'm glad you've figured that one out!

Thank you and let us know if you find something else.

Re: Can't debug PHP projects

PostPosted: November 25th, 2017, 5:34 am
by sawebdev
Ya, there seems to be a few people having this issue. Though they say it should be fixed in 15.5, however I installed the 15.5 preview and it still won't run any php solutions that are in OneDrive. I disabled the files-on-demand and it didn't help...