Using Visual Studio Code with PHP and Xdebug
This post describes how to set up, run, and debug PHP code with Visual Studio Code running on Windows.
What do we need?
Compared to some other popular programming languages for the Web, PHP is missing some tools, so I created a shopping list to make the experience more complete.
Basically what we need is:
- the PHP runtime itself,
- a modern code editor with syntax highlighting,
- a debugger connected to our code editor,
- and a (development) webserver.
Runtime (PHP)
We start with the PHP runtime. The PHP runtime will pars en execute our .php
files and outputs the HTML (or anything you want) back to you.