Skip to main content


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 12:24 Go to next message
Christoph Grimmer-Dietrich is currently offline Christoph Grimmer-DietrichFriend
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 14:38 Go to previous messageGo to next message
Christoph Grimmer-Dietrich is currently offline Christoph Grimmer-DietrichFriend
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 13:28 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 360
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 15:20 Go to previous message
Christoph Grimmer-Dietrich is currently offline Christoph Grimmer-DietrichFriend
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: Thu Mar 28 23:33:27 GMT 2024

Powered by FUDForum. Page generated in 0.04971 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top