I have a windows7 machine configured with xampp171 PHP (5.3) and a recent xdebug. I currently use Eclipse to debug. I can set breakpoints on PHP code in eclipse, and hit that PHP code by launching through a web browser or Flash application. The debugger connects correctly and allows me to step through PHP code and view variables.

I would like to switch to VS.PHP, but is this scenario even possible - to attach to apache? Or can debugging only happen with F5? I set it up for an external server with XDebug, but so far, no luck. Is there any way to troubleshoot and get more details on with XDebug the IDE is registering with, if any at all? Seems like a complete black hole right now.

juanc says:

it is possible.

You need to set the project debug properties to use external web server. You need to press F5 to start the debug session.

Also make sure the xdebug port matches between the php.ini file and the project debug advanced settings.

Juan

dineshkumar says:

Hello Juan,

I looked at your response.
I have a similar question. My website is already running in Apache locally.
How do I attach to it directly so that I can start debugging the php files? Currently when I attach to httpd.exe, I am unable to debug my php files.

Thanks for your help.

Dinesh

juanc says:

No need to attach the debugger to your Apache process.

All you need to do is configure XDebug in your Apache's php.ini file

Also make sure the port you set in the php.ini is the same as the one VS.Php will listen to (check project debug settings)

smbslt says:

So the debug settings should use the same port as what is in the php.ini file for "xdebug.remote_port"?

What about the start page? I want to debug a page that has a dynamically created URL, how would I debug a page like that?

juanc says:

1. Yes

2. What do you mean by a dynamically created URL?

Juan

smbslt says:

I'm looking to use vs.php to debug customizations done to a SugarCRM site. So if I've made changes to the edit form for the the contacts module, for instance, the URL of the page will be different for every contact record that I edit.

smbslt says:

Any suggestions??

juanc says:

There is an option in XDebug settings to start the debug session always regardless of the URL.