Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Debugging a PHP Script in it's own directory(I need to change into a scripts directory to debug it.)
icon5.gif  Debugging a PHP Script in it's own directory [message #628403] Thu, 23 September 2010 08:24 Go to next message
Christoph Grimmer-Dietrich is currently offline Christoph Grimmer-Dietrich
Messages: 3
Registered: September 2010
Junior Member
Hello!

I have a problem with a PHP script which is part of a larger project.
The script runs fine when I enter the scripts directory in the console (Windows cmd shell) and start it with

php -f script.php


If I use the eclipse debugger to run the script (to use XDebug) several classes are suddenly not included properly. This is very strange since the script starts with
chdir(realpath(dirname(__FILE__)));


Is there a way to tell eclipse to start the script from a certain directory?

Hoping for help
Christoph GD


May contain nuts.
icon10.gif  Re: Debugging a PHP Script in it's own directory [message #628874 is a reply to message #628403] Fri, 24 September 2010 10:38 Go to previous messageGo to next message
Christoph Grimmer-Dietrich is currently offline Christoph Grimmer-Dietrich
Messages: 3
Registered: September 2010
Junior Member
Ok, I solved the problem by other means. But I'm still curious whether it is possible to start a file from a certain directory.

May contain nuts.
Re: Debugging a PHP Script in it's own directory [message #629492 is a reply to message #628874] Tue, 28 September 2010 09:28 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro Izumi
Messages: 344
Registered: July 2009
Location: Japan
Senior Member
I'm not sure but try this;
Open your Run/Debug Configuration of the script
Select "Environment" tab
Click "New" and enter
Variable: XDEBUG_WORKING_DIR
Value: {full path you need}

Sorry if I misunderstood Smile
Re: Debugging a PHP Script in it's own directory [message #631215 is a reply to message #629492] Wed, 06 October 2010 11:20 Go to previous message
Christoph Grimmer-Dietrich is currently offline Christoph Grimmer-Dietrich
Messages: 3
Registered: September 2010
Junior Member
Thanks for the answer. Don't know whether this will do the job... I will test it some day.

Thanks again!


May contain nuts.
Previous Topic:Eclipse and mootools
Next Topic:PHP files - Permission denied after CSV operation
Goto Forum:
  


Current Time: Fri Aug 01 10:13:57 EDT 2014

Powered by FUDForum. Page generated in 0.03099 seconds