martomo / SublimeTextXdebug

Xdebug debugger client for Sublime Text
MIT License
564 stars 89 forks source link

Path mapping relative to project folder #143

Open Ralle opened 9 years ago

Ralle commented 9 years ago

I am working on a project both from my Mac laptop and from my Windows PC. Everything is cross platform so far and I would like to keep it that way. I have an issue with the 'path_mapping' as it must be absolute. I would very much like to see something along the lines of:

"path_mapping": {
    "/var/www/html/library/": "./addons/library/",
}

Where the dot '.' is the folder of the .sublime-project file.This would greatly help the portability of my project :).

mrphang commented 9 years ago

it'd probably be better to have it use sublime's built-in variables so something like

"path_mapping": {
    "/var/www/html/library/": "${project}/addons/library/",
}

Though i'm not sure know how it should work where you have multiple folders in the project. perhaps some kind of macro expansion like ${folders:name_of_folder_in_project}

yannisc commented 8 years ago

I need this as well. It's essential in order to be able to have the project file with this setting inside git and be able to share with others.