'How to set PHP executable path php.validate.executablePath in VCSode when PHP is installed inside a virtual machine?

I want to use Xdebug in Visual Studio Code using the Xdebug extension.

My development environment is installed inside an Ubuntu VM. VSCode is installed on my Windows PC.

The extension asks for php executable path. php.debug.executablePath

File mappings are done using Homestead.

enter image description here

ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: virtualbox

authorize: C:/Users/my-pc/Desktop/cp_vm/ssh/key.pub

keys:
    - C:/Users/my-pc/Desktop/cp_vm/ssh/id_rsa

folders:
    - map: C:/Users/my-pc/Desktop/cp_vm/ClientPortal
      to: /code/


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source