Bug 249879 - RFE: provide URL mapping with Xdebug
Summary: RFE: provide URL mapping with Xdebug
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 530834
Blocks:
  Show dependency tree
 
Reported: 2008-10-06 18:17 EDT by Udo Rader CLA
Modified: 2020-05-14 10:16 EDT (History)
2 users (show)

See Also:


Attachments
screenshot showing the mapping in question (13.39 KB, image/png)
2008-10-06 18:17 EDT, Udo Rader CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Rader CLA 2008-10-06 18:17:49 EDT
Created attachment 114360 [details]
screenshot showing the mapping in question

Build ID: M20080221-1800

Steps To Reproduce:
I have the following configuration:

some vhost definition:
[...]
DocumentRoot /some/where/over/the/rainbow/
[...]

eclipse workspace
/home/udo/wa/foo

project location inside workspace
barProject/src

and finally a symlink from /home/udo/wa/foo/barProject/src to /some/where/over/the/rainbow/bar like below:

% ls -l /some/where/over/the/rainbow/
lrwxrwxrwx 1 udo prog 39 2008-09-24 21:05 bar -> /home/udo/wa/foo/barProject/src/

Inside barProject/src there is on file named "test.php", so that a valid URL on the vhost would be:

http://barVhost/bar/test.php

Now I have configured Xdebug to debug scripts on the vhost, with the following URL mapping (see also the attached screenshot):

Server /bar => Workspace barProject/src

When I finally right click on test.php and choose "Debug As => PHP Web Page" a completely wrong URL is suggested, despite the mapping configuration:

http://barVhost/barProject/src/test.php

This is quite annoying if you have to debug many individual scripts (like I have).


More information:
Comment 1 Michael Spector CLA 2008-10-23 08:47:31 EDT
The Path Mapper does not map between URL and local resources. It maps from local file name to remote file name, which is not a part of URL.
For example: /barProject/src is mapped to /var/www/bar, but /var/www/bar has nothing to do with URL.
Comment 2 Udo Rader CLA 2008-10-23 09:06:02 EDT
Hmm, so it is a pretty useless feature then? 

How would I use it in a reasonable way (I honestly can't think of a way do so)?
Comment 3 Michael Spector CLA 2008-10-23 10:34:10 EDT
There's a help page in PDT called "Path Mapping". Please read it.
Thanks!

(In reply to comment #2)
> Hmm, so it is a pretty useless feature then? 
> 
> How would I use it in a reasonable way (I honestly can't think of a way do so)?
> 

Comment 4 Udo Rader CLA 2008-10-23 12:17:35 EDT
well, I already RTFM :-)

So I am reopening the case and changing the severity to "enhancement".

It just would be nice to have an URL<->FS mapping feature.
Comment 5 Matthias Becker CLA 2018-07-03 09:33:03 EDT
I don't think that the solution 530834 does fit this issue.
The solution layed out in 530834 is about handling SWT.OpenUrl events that come in from the operating system
Comment 6 Dawid Pakula CLA 2018-07-03 09:35:26 EDT
Xdebug Exception prints produce in browser links like "xdebug://file_path:line_num", If user click in browser I'll be able to handle it, so I think bug is correct.
Comment 7 Matthias Becker CLA 2018-07-03 11:16:43 EDT
(In reply to Dawid Pakula from comment #6)
> Xdebug Exception prints produce in browser links like
> "xdebug://file_path:line_num", If user click in browser I'll be able to
> handle it, so I think bug is correct.

OK. That sounds reasonable.
Comment 8 Matthias Becker CLA 2018-10-17 10:21:19 EDT
so the uri scheme handler extension point and the operating system registration via the preference page was merged today. So you could start to implement a handler for your use-case
Comment 9 Matthias Becker CLA 2018-12-04 09:41:01 EST
Just a short heads-up.
The uriSchemeHandler extension point is part of eclipse platform 4.10 (2018-12 SimRel).
Any new on this bug? You could not consume the extension point and add handling of xdebug:// URLs.
Comment 10 Eclipse Genie CLA 2020-01-04 08:00:38 EST
New Gerrit change created: https://git.eclipse.org/r/155200
Comment 12 Dawid Pakula CLA 2020-01-05 07:30:18 EST
Now (after over 11 years) PDT support:
xdebug.file_link_format=xdebug://%f@%l

and:
xdebug.file_link_format=xdebug://%f:%l