I was wondering if it's possible to map more than one path in vscode?
I'm working with Vagrant to develop a WordPress theme, and I'm using two shared folders on the guest.
I'm sharing one folder for the root of WordPress installation called www and the other one which is in the same path called main, shared on the guest within themes folder of WordPress installation.
Vagrantfile:
config.vm.synced_folder "./www/", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
config.vm.synced_folder "./main", "/var/www/wp-content/themes/main", :mount_options => ["dmode=777", "fmode=666"]
The problem is with the current launch.json file I'm not able to define two paths for my source codes, and when I'm debugging, VSCode doesn't hit the breakpoints anywhere in the main folder!
Take a look at the hierarchy below:

It's worth mentioning I'm currently achieving this using Sublime Text, but I'd like to work in VSCode instead.
Sublime Text project settings:
{
"settings": {
"xdebug": {
"path_mapping": {
"/var/www/wp-content/themes/main" : "/Users/[user]/Documents/[project]/main",
"/var/www" : "/Users/[user]/Documents/[project]/www",
},
"super_globals": true,
"close_on_stop": true
}
}
}
Extra info:
PHP version: 5.6.14-1
XDebug version: 2.3.3
Your launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true,
"serverSourceRoot": "/var/www",
"localSourceRoot": "/Users/[user]/Documents/[project]/www"
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Thanks in advance.
Amin
I was wondering if it's possible to map more than one path in vscode?
I'm working with Vagrant to develop a WordPress theme, and I'm using two shared folders on the guest.
I'm sharing one folder for the root of WordPress installation called
wwwand the other one which is in the same path calledmain, shared on the guest withinthemesfolder of WordPress installation.Vagrantfile:
The problem is with the current launch.json file I'm not able to define two paths for my source codes, and when I'm debugging, VSCode doesn't hit the breakpoints anywhere in the
mainfolder!Take a look at the hierarchy below:
It's worth mentioning I'm currently achieving this using Sublime Text, but I'd like to work in VSCode instead.
Sublime Text project settings:
Extra info:
PHP version: 5.6.14-1
XDebug version: 2.3.3
Your launch.json:
Thanks in advance.
Amin