Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Usage of xdebug.file_link_format
Usage of xdebug.file_link_format [message #1063473] Thu, 13 June 2013 09:21 Go to next message
Roland Dalmulder is currently offline Roland Dalmulder
Messages: 2
Registered: June 2013
Junior Member
Hello all Smile

I am researching how to open links from XDebug into Eclipse and have found numerous information regarding other IDEs but nothing concrete for Eclipse. The only reference on this forum links to this thread from 2008 (I did not want to revive that one):

http://www.eclipse.org/forums/index.php/m/74876/?srch=xdebug.file_link_format

Are there any instructions on how to set this up? So we can click the link from XDebug and Eclipse opens the file on the selected line. I am currently running Eclipse Juno.

Any insight is appreciated.
Re: Usage of xdebug.file_link_format [message #1063733 is a reply to message #1063473] Thu, 13 June 2013 22:34 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro Izumi
Messages: 353
Registered: July 2009
Location: Japan
Senior Member
Well...I feel the explanation of Xdebug: Documentation is very enough. (I read it for the first time.)

Unfortunately,
>Eclipse opens the file on the selected line
this is impossible because Eclipse doesn't support it.
See Bug 305336 Ability to open a file from command line at a specific line number.
Re: Usage of xdebug.file_link_format [message #1063887 is a reply to message #1063733] Fri, 14 June 2013 19:10 Go to previous message
Roland Dalmulder is currently offline Roland Dalmulder
Messages: 2
Registered: June 2013
Junior Member
Thanks for your reply. Well the explanation might have been enough for you but not for me, however I did manage to get it working.

As for the line number, we will wait Smile

For those wondering how I did here, here goes.
System: Windows 8 + Eclipse Juno

1. php.ini
Modify the php.ini to read:
xdebug.file_link_format = "editor://open/?file=%f&line=%l"


2. run-editor.js
Create the run-editor.js as described on this page: http:// pla.nette.org/en/how-open-files-in-ide-from-debugger#toc-windows.
Replace the Netbeans line with:
var editor = '"D:\\Eclipse4\\eclipse.exe" "%file%"';

Make sure to change D:\\Eclipse4 with your own path and store the file in an easy to remember place.

3. editor.reg
Create the editor.reg file as described on this page: http:// pla.nette.org/en/how-open-files-in-ide-from-debugger#toc-windows.

Don't forget to change the path of the run-editor.js to the location used in step 2.

4. Apache
Restart Apache and the links should work.
Previous Topic:xDebug does not stop on break point
Next Topic:[Solved] The old chestnut: xdebug not stopping at breakpoints
Goto Forum:
  


Current Time: Thu Oct 30 17:48:44 GMT 2014

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

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