Problems with debugging

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

Problems with debugging

Postby Pablo020 » November 9th, 2012, 2:34 pm

Hello,
I've PHP tools installed, php running under IIS 7.5 using de php-cgi.exe, Intellissense on PHP works, XDebug installed (phpinfo tells me it is loaded) and remote port is 9000 ... In the vs studio options the same port is specified...
But I can't get DEBUG working...
I', working in an existing webproject created using vs months before php tools were installed.
When I click on the left to set a new breakpoint, the breakpoint is set. When pressing F5, the breakpoints become transparaent with an error saying:
Breakpoint will not be hit. No symbols have been loaded....

Any ideas on how to get this to work?
Paul
Pablo020
 
Posts: 27
Joined: October 30th, 2012, 7:46 am

Re: Problems with debugging

Postby Miloslav Beno » November 9th, 2012, 4:04 pm

Hi Paul,

Thank you for contacting us.

From what you are saying it would seem that you are using Phalanger Tools instead of just PHP Tools. That would explain "No symbols have been loaded", because Phalanger is using .NET debug engine and can't just load any symbols. To be able to debug with XDebug you need to have just PHP Tools installed (at least for now).

If that's not the case what you can try is to check if you have properly set url in Custom Server option in Project properties.
(for now it can be just local url, remote is comming soon).

Still issues? Go to Tools>Options>PHP Tools>Interpretes and find or register your php. There is configuration check utility that will analyze your settings and tries to find possible problems.

Please give me know it this helped or you are still having the issues.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Problems with debugging

Postby Pablo020 » November 9th, 2012, 5:38 pm

Milaslov,
Thanks for the reply. I only have PHP tools, no phalanger. I'll follow up on your other suggestions and get back... thanks for now! If meanwhile you have additional suggestions .. please let me know.. Regards,Paul
Pablo020
 
Posts: 27
Joined: October 30th, 2012, 7:46 am

Re: Problems with debugging

Postby Pablo020 » November 11th, 2012, 10:56 am

Hello,
I tried the suggestions, but no result yet.
I'm using a local IIS ionstance. I registered in IIS php_cgi.exe as php handler. (That's supposed to be appropriate, right?). I made sure the php path is correct in VS: Tools -> Options -> PHP Tools -> Interpreter ...

For debugging I've setup the properties of the webproject to 'Use custom Server'. The url I've specified is a locally configured URL which resolves to the local IIS server. I did that using the hosts file, ie 127.0.0.1 -> myurl.nl

But ... no debugging?? Any thoughts on where to start looking?

Paul
Pablo020
 
Posts: 27
Joined: October 30th, 2012, 7:46 am

Re: Problems with debugging

Postby Miloslav Beno » November 11th, 2012, 1:27 pm

Hello Paul,

Is your project PHP Web Project? You can send the project file (*.phpproj) here. I'd take a look. If your project isn't PHP Web Project you can try to go File>New>Project From Existing Code... choose PHP and chose directory where your current project is located.

If it was created by another tool and it is phpproj, migration should pop out.

If your project is correct PHP Web Project, I'd ask more questions:
- What PHP version do you have?
- Is it non-thread safe version?
- Do you have correct XDebug version installed ?
- Is it configured as zend_extension?

You can attach your php.ini I'll take a look.

When you press F5 do you see systray poping out? http://sphotos-f.ak.fbcdn.net/hphotos-ak-ash3/579056_120460644776449_1967354983_n.png

Do you see in output window something like this?
Code: Select all
Auto-attach to process '[528] PHP.Debugger.Systray.exe' on machine 'MILOSLAV-NB' succeeded.
Auto-attach to process '[4384] php-cgi.exe' on machine 'MILOSLAV-NB' succeeded.


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

Re: Problems with debugging

Postby Pablo020 » November 11th, 2012, 9:56 pm

Ahh .. i did not know it had to be a php project I have to work in. The project I'm working in is an existing ASP.Net Web project.
For testing I created a new php project, debugging works inside that project!
Thats progress... ;-)
Now, as you suggested I created a new project from existing code ... and that works as well... including debug support.
Again .. progress ;-)
It seems global asax doesn't work in a PHP file ... hummm got to think of another way of doing things I were doing there ...
Thanks for the support!
Paul
Pablo020
 
Posts: 27
Joined: October 30th, 2012, 7:46 am

Re: Problems with debugging

Postby Pablo020 » November 11th, 2012, 10:01 pm

Ay ... I was also using the asp.net project to serve as an endpoint for my webservices... I assume I have to find another solution for that as well...
Any thoughts on that?
Paul
Pablo020
 
Posts: 27
Joined: October 30th, 2012, 7:46 am

Re: Problems with debugging

Postby Miloslav Beno » November 11th, 2012, 10:15 pm

I'm glad it works for you!

It is actually possible to attach debugger without having PHP project, but it is included only as experimental feature right now. And only works for actual php worker processes, doesn't work for host proceses as w3wp.exe. It will be finished in some of the upcoming updates.

About global.asax, that doesn't work with classic PHP. However it works if you'd use Phalanger as it gets compiled as ASP.NET application. But that's different story, nothing to do with PHP Tools:)
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Problems with debugging

Postby Pablo020 » November 11th, 2012, 10:44 pm

Thanks milaslov,
I guess I ought to go with the default way of doing things... so I preefer continue as php project.
In my VS Solution I included some class libraries that have several webservices implemented. In my originl asp.net project I added some bla.svc files, which did nothing more than making the webservices available under /Services/<serviceName>/<MethodName>

That is broken now ... do you have any thoughts on how I can make those webservices available again?

Paul
Pablo020
 
Posts: 27
Joined: October 30th, 2012, 7:46 am

Re: Problems with debugging

Postby Miloslav Beno » November 12th, 2012, 12:11 am

I'm not sure if I understand it correctly. But if you just trying to launch multiple projects in one time you can do that in Solution properties. http://msdn.microsoft.com/en-us/library/ms165413.aspx
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Next

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 53 guests

cron

User Control Panel

Login

Who is online

In total there are 53 users online :: 0 registered, 0 hidden and 53 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 53 guests