1

My Laravel project is setup in VS Code. This project is setup to use Homestead/Vagrant. I'm trying to setup the launch.json file, but I can't figure out how the pathMappings must be setup:

"configurations": [
    {
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000,
        "pathMappings": {
            "/path/on/server": "${workspaceRoot}/local/path"
        }
    }
]

How do I set: /path/on/server?

How do I set: ${workspaceRoot}/local/path?

6
  • You have defined both already: laravel.com/docs/5.6/homestead ``` folders: - map: ~/code/project1 to: /home/vagrant/code/project1 ``` Commented May 7, 2018 at 10:01
  • Can you show me, based on your example , what the "pathMappings" syntax will be in launch.json file. Commented May 7, 2018 at 10:15
  • 1
    An example can be: pathMappings": { "/var/www/laravel": "C:\Users\Thomas\Documents\laravel"} Commented May 7, 2018 at 10:33
  • This is taken from my Homestead.yaml file: folders: - map: ~/Code to: /home/vagrant/Code sites: - map: homestead.test to: /home/vagrant/Code/php_projects/BuildAid/BuildAidProject/public Commented May 7, 2018 at 10:56
  • Based on the information from the Homestead.yaml file, what must the pathMappings be? Commented May 7, 2018 at 10:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.