views:

99

answers:

1

I'm running eclipse 3.5 (Galileo) with the PHP development tools (PDT) plug in. I also installed XDebug by following these instructions.

It works great when I debug a web page running on localhost. I can set break points and step through the code.

However, I can't debug a PHP script. I can run it, and I see the output from print statements in the console, but it ignores any break points.

Is it possible to debug a PHP script, or does PHP debugging only work under a web server?

+1  A: 

The instruction say : In XAMPP, the default location for the php.ini file is “c:\xampp\apache\bin\php.ini. The cli version may very well use another php.ini. Did you change this .ini, too?

<?php echo get_cfg_var('cfg_file_path');

tells you which .ini you have to change.

VolkerK
Nailed it! I'm using Wamp Server, and there's one php.ini file in C:\wamp\bin\apache\apache2.2.8\bin that you edit when you choose php.ini from the Wamp Server menu. There's a separate php.ini file in C:\wamp\bin\php\php5.2.6 that I had selected for running PHP scripts. I made the XDebug changes in that file, and the breakpoints work. Thanks for the help.
Don Kirkby