VS2010 setup WAMP and debugging

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

VS2010 setup WAMP and debugging

Postby Lloyd » October 8th, 2013, 4:26 pm

Hi I'm new to PHP tools and PHP programming in general but I can't seem to figure this one out, on my computer I run WAMP and Visual Studio 2010 Ultimate.

my php.ini looks like this:
Code: Select all
; XDEBUG Extension

zend_extension = "c:/wamp/bin/php/php5.4.3/zend_ext/php_xdebug-2.2.0-5.4-vc9.dll"

[xdebug]
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9001
xdebug.remote_mode = req
xdebug.idekey="php-vs"

in visual studio under "Tools > Options > PHP Tools > Advanced"
the XDebug Debugger Port is set to: 9001

When I left click the wamp icon in system tray I go to: "PHP > PHP Settings" and then "(XDebug): Remote Debug" is check marked (there use to be 2 more options)

(in Visual Studio)
When I right click on "Website Properties" (note NOT solution properties) I go to "Property Pages" then under "Start Options" by "Start Action" I select "Specific page:" I enter: "index.php" then under "Server" I select "Use Custom Server" I enter: "http://localhost/emptywebsite1/" after all that I click "Apply" then "OK".

Then if I enter code in the index.php file, as:
Code: Select all
<?php

echo phpinfo();

?>

and click on the Play button (Start Debugging (F5)) my default browser pops up with the result of the code, but when I put a break point on the "echo phpinfo();" line and click on Play nothing happens, and Visual Studio also doesn't have the "Stop" debugging icon.

How should I configure Visual Studio to show the debugging as if I'm coding in C#?

And when I choose "Use default Web Browser" under property pages the same thing happens.
South Africa +2 GMT
Johannesburg
User avatar
Lloyd
 
Posts: 3
Joined: October 3rd, 2013, 9:34 pm
Location: South Africa

Re: VS2010 setup WAMP and debugging

Postby Miloslav Beno » October 8th, 2013, 4:44 pm

Hi Lloyd,

It seems you are trying to debug Visual Studio Web Site which does not support PHP Debugging. In order to debug in PHP you need to create PHP Web Project.

You can convert your web site to PHP project from VS Menu: File>New>Project From existing Code…

Give me know if that helped.

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

Re: VS2010 setup WAMP and debugging

Postby Lloyd » October 8th, 2013, 6:13 pm

Hi Miloslav,

I see after I made a new Web Project (VS "File > New > Project") the debugging works, I think I missed the difference between a "Web Site" and a "Web Project"

I'm glad it works :D

And thank you for the fast reply.

All the best,
Lloyd
South Africa +2 GMT
Johannesburg
User avatar
Lloyd
 
Posts: 3
Joined: October 3rd, 2013, 9:34 pm
Location: South Africa

Re: VS2010 setup WAMP and debugging

Postby Miloslav Beno » October 9th, 2013, 2:34 pm

Hi Lloyd,

Glad you have it working.

I guess this difference is confusing for lot of people. We're most likely going to remove the support for PHP Web Sites in future version. They are already not supported by us in VS2012 nor 2013 anyway.

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

Re: VS2010 setup WAMP and debugging

Postby Tobraq44 » October 19th, 2013, 6:30 am

What can I do, When I get this, "Aestan Tray Menu
Aestan Tray Menu has encountered a problem and needs to close."
Tobraq44
 
Posts: 1
Joined: October 19th, 2013, 6:26 am

Re: VS2010 setup WAMP and debugging

Postby Miloslav Beno » October 19th, 2013, 4:21 pm

Hi,

that's more of the question for wamp server forum. I've found similar problem right here http://forum.wampserver.com/read.php?2,78924,78988
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 68 guests

cron

User Control Panel

Login

Who is online

In total there are 68 users online :: 0 registered, 0 hidden and 68 guests (based on users active over the past 5 minutes)
Most users ever online was 511 on April 27th, 2024, 10:11 pm

Users browsing this forum: No registered users and 68 guests