PHP
Setup evironment on Visual Studio Code
Install PHP Extensions for VSCode
- PHP Intelephense: provides PHP language support, including syntax highlighting, code completion, and more.
- PHP Debug: allows you to debug PHP code within VSCode.
Configure PHP Debug
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9003
}
]
}