|Xdebug and RSE - wrong path (and other questions) [message #884371]
||Sun, 10 June 2012 23:45
| Anders Iversen
Registered: June 2012
First off all, sorry for the long post - I just want you to have all the details, so you can easily find any obvious errors, or pinpoint obvious things I haven't done/mentioned.
I've a virtual ubuntu 10.10 server with a LAMP stack running as my dev-webserver on a local network - on it I have drupal 7 running. I've installed xdebug on it, and on my desktop (on the same network) I have Eclipse indigo 3.7.2 with PDT, RSE and Drupal for Eclipse.
I've installed the Firefox plugin for xdebug.
I've set up RSE to connect to the http docs folder /srv/www where my drupal installation is - it's in a folder called od.
I've then right clicked on the od folder in the RSE view in Eclipse and chosen "Create Remote Project", and it creates the romote project, and I can open the project and see/edit all the files in the drupal installation. When I load the drupal site in FF with debugging turned on, it connects to Eclipse and debugging starts - I've the "break at first line" checked under Preferences -> PHP -> Debug. It works. But if I set any breakpoints it doesn't stop at those breakpoints. I've tried setting breakpoints in the page.tpl.php file which should get loaded on all pages, and also in the user module and tried to login and go to my user page. It just runs through like there's no breakpoints.
So whats wrong ? Probably something with the path says the million pages I've looked at when Googling for a solution.
My settings for Xdebug in php.ini:
A few things puzzles me:
When I create the remote project the path and the name for the project is automatically set to mysite_od where mysite is the hostname of the webserver. I've tried to change that but I can't. It looks wrong to me, but I don't know if it is wrong though.
In the Xdebug log I have this:
<- breakpoint_set -i 247 -t line -f file:///myserver_od/sites/default/themes/odtheme/page.tpl.php -n 40
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http ://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="247" id="260530007"></response>
And unless eclipse automatically exchanges with the actual path, then that is wrong - I think it should be , but as I mentioned above I cannot change it(?)
At the start of the log it get's the path right in
Log opened at 2012-06-10 17:46:21
I: Connecting to configured address/port: 192.168.1.8:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http ://xdebug.org/dbgp/xdebug" fileuri="file:///srv/www/od/index.php" language="PHP" protocol_version="1.0" appid="26053" idekey="netbeans-xdebug"><engine version="2.2.0"><![CDATA[Xd
ebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http ://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>
(Notice it says idekey="netbeans-xdebug" - is that a problem? It's the default setting and I've put in xdebug.idekey="eclipse-xdebug" in php.ini, but it doesn't change it)
It looks like the xdebug and eclipse setup is good and functioning for the index.php.
But I'm in doubt if I need to setup additional things in Eclipse to get breakpoints to work. To start with I had only setup php server and debugging settings in general for Eclipse:
baseurl: http ://mysite
Local web root: /home/myuser/workspace/RemoteSystemsTempFiles/192.168.1.110/srv/www/od
(no path mapping)
debugger: Xdebug, PHP server default php server (the one above), php executable not defined, checked enable CLI debug
This worked as first described - but ignoring breakpoints.
So I tried to setup a php executable with path set to /usr/bin/php5 - no difference.
If I right clicked on the project in the project explorer and chose properties, I didn't have any options for "PHP Debug" as some threads mentioned, but that changed after I added a new "PHP web application"-launch configuration under Debug configurations for the project (settings more or less obvious). In the Advanced tab it makes no difference wether I set "Debug through SSH tunnel" or not (It connects succesfully when testing).
Now I got the "PHP Debug"-option and I could "enable project specific settings, and the default base URL path there was wrong. Hurray! I thought - I finally found it. Base path was set to /mysite_od - I changed it to /
But no change - it still does not break at breakpoints, and in the xdebug log I still see the file:///myserver_od/...
Powered by FUDForum
. Page generated in 0.02227 seconds