Debugging with older version of PHP

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Debugging with older version of PHP

Postby gerard789 » May 30th, 2018, 4:02 am

Hi,

I have just installed this to trial it out. I am using VS 2017. But we have an old project that uses a lot of the (now deprecated, I now) mysql_ calls, instead of mysqli or POD. This means that we need to run this project with PHP 5.6. Each time I start up the project, I get the message that PHP 7.1 with debug extension is missing.
Can I install PHP 5.6 with debugging extension instead and then still debug? Will PHP Tools pick that up?

Thanks for your help.

Gerard
gerard789
 
Posts: 2
Joined: May 30th, 2018, 3:56 am

Re: Debugging with older version of PHP

Postby Miloslav Beno » May 30th, 2018, 9:18 am

Hello Gerard,

You can switch PHP version in the project properties (right click on project node in Solution Explorer), and switch the PHP version. Then save the solution. That should do it.

Please let me know if that helped.

Cheers!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1198
Joined: January 7th, 2012, 8:36 pm

Re: Debugging with older version of PHP

Postby gerard789 » May 31st, 2018, 9:16 pm

Hi Miloslav,

Thanks for your help. I hadn't realised that option was there indeed. But when I do that I indeed get the popup that I need to install the debugger for PHP when I open Visual Studio, and for version 5.6. Unfortunately the Web Platform installer fails on installing. That seems to be a common thing for PHP 5.6, there is something wrong in that package and for some reason it does not get fixed.

Trying to install XDebug manually on Windows 10, (I already have PHP 5.6 on my laptop), tells me it is not supported for anything less than PHP 7.

So I am stuck again. Unless you have some pointers for how to install this manually. I have PHP 5.6.36 NTS for Windows installed already (in a folder C:\PHP5, which is also in my PATH).

Thanks,

Gerard
gerard789
 
Posts: 2
Joined: May 30th, 2018, 3:56 am

Re: Debugging with older version of PHP

Postby Miloslav Beno » June 6th, 2018, 6:26 pm

Hi Gerard,

Will take a look at PHP 5.6 auto install problem. Were you able to see what was the error when it failed?

For now you can go to Server tab in the project properties and you should see your installation in the Runtime combobox, if you don't. Just go to Tools | Options | PHP | Interpreter and click register new php path.

Thanks
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1198
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 9 guests

User Control Panel

Login

Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 9 guests
Phalanger