VS Code + Xdebug + PHP Linter

A couple of things:

  1. You don’t mention it explicitly, but if you’re eventually wanting to use Xdebug’s step debugger, you might be interested in installing the Xdebug + VS Code Local addon.

  2. To your specific question of where the PHP binary lives.

    • You’re correct that in Local Classic (<3.3.x) PHP was a linux binary within a Docker container, that was within a VM
    • Under Local lightning, there’s no virtual machine, but each site does have its own configuration for the various pieces of server software. I’m not 100% sure what the VS Code linter needs, but the easiest way to get a peek at the environment of a site is to right-click on the site and select “Open Site Shell.” From there, you can examine the shell script that was run to configure that environment. Here’s a screenshot of one of those shell scripts for one of my Local sites:

Hope that gives you some more context and get’s you on your way!