Page 1 of 2

Problems with debugging

PostPosted: November 9th, 2012, 2:34 pm
by Pablo020
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

Re: Problems with debugging

PostPosted: November 9th, 2012, 4:04 pm
by Miloslav Beno
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.

Re: Problems with debugging

PostPosted: November 9th, 2012, 5:38 pm
by Pablo020
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

Re: Problems with debugging

PostPosted: November 11th, 2012, 10:56 am
by Pablo020
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

Re: Problems with debugging

PostPosted: November 11th, 2012, 1:27 pm
by Miloslav Beno
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

Re: Problems with debugging

PostPosted: November 11th, 2012, 9:56 pm
by Pablo020
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

Re: Problems with debugging

PostPosted: November 11th, 2012, 10:01 pm
by Pablo020
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

Re: Problems with debugging

PostPosted: November 11th, 2012, 10:15 pm
by Miloslav Beno
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:)

Re: Problems with debugging

PostPosted: November 11th, 2012, 10:44 pm
by Pablo020
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

Re: Problems with debugging

PostPosted: November 12th, 2012, 12:11 am
by Miloslav Beno
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