PHP setup
Here is how to set up PHP in VS Code with mise:
- Install the mise-vscode extension (if not already installed)
- Open a project with a
mise.tomlfile (or any other files supported by mise)
Installing PHP
Section titled “Installing PHP”vfox-php
Section titled “vfox-php”I would recommend using the vfox-php toolchain for PHP development.
This will require you to install some system dependencies, see https://github.com/version-fox/vfox-php?tab=readme-ov-file#prerequirements for more information.
brew install autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libxslt libzip pkg-config re2c zlib sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxslt-dev libzip-dev openssl pkg-config re2c zlib1g-devmise use vfox:version-fox/vfox-phpThis will compile and install the latest version of PHP on your system (note that this may take a few minutes).
If you want to install it globally, use:
mise use -g vfox:version-fox/vfox-phpasdf-php
Section titled “asdf-php”This will show you how to install PHP using the default mise provided asdf-php plugin.
Installation details
Currently, the default php provided mise is the asdf-php plugin.
This plugin requires a few dependencies to be installed on your system. See the asdf-php README for more information.
brew install autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip pkg-config re2c zlib sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-devYou can now install php using mise:
mise use asdf:asdf-community/asdf-phpThis will compile and install the latest version of PHP on your system (note that this may take a few minutes).
Default PHP support
Section titled “Default PHP support”The default PHP support in vscode is limited to syntax highlighting and basic code completion. It also runs the php linter on save by default.
mise-vscode will configure the php.validate.executablePath allowing VS Code to run the PHP linter.

You can find the default php extension by searching for @builtin php-language-features in the extensions view.
PHP debugger setup
Section titled “PHP debugger setup”If you wan to run and debug PHP files from VS Code, you will need to install additional extensions.
The extension supported by mise-vscode is PHP X-Debug extension
If you install it, mise-vscode will automatically configure the php.debug.executablePath setting in your workspace settings.
Running PHP files
Section titled “Running PHP files”You should now be able to run PHP files from VS Code.

Debugging PHP files
Section titled “Debugging PHP files”You will need to install xdebug. Open a terminal in VS Code and run the following command:
pecl install xdebugInspect the output of the command. The last line you should like this:
# ...You should add "zend_extension=/home/dev/.local/share/mise/installs/vfox-version-fox-vfox-php/8.4.1/lib/php/extensions/no-debug-non-zts-20240924/xdebug.so" to php.iniOpen the php.ini file (you can find it by running php --ini) and add the line to the end of the file.
You can now debug PHP files from VS Code:
- Go to the debug view in the sidebar
- Create the default
launch.jsonfile - The default target “Launch currently open script” should allows you to run and debug PHP files.

Example with laravel
Section titled “Example with laravel”mise exec vfox:version-fox/vfox-php -- composer create-project laravel/laravel example-appcd example-appmise use vfox:version-fox/vfox-phpphp artisan serveOpen http://127.0.0.1:8000/ in your browser to see the Laravel welcome page.
You can now open the example-app folder in VS Code.
To enable debugging, update your php.ini (use php --ini to find it) file with the following:
zend_extension=... # same as in the `PHP debugger setup` section
xdebug.start_with_request=yes ;xdebug.mode=develop,gcstats,coverage,profile,debugxdebug.idekey=VSCODExdebug.client_port=9003 ;You can now set breakpoints in your code and start debugging.
- Run
php artisan servein the terminal - Go to the debug view in the sidebar
- Click the
Listen for XDebugbutton
