86
loading...
This website collects cookies to deliver better user experience
php7.4 -v
php -v
sudo apt install php7.4-xdebug
sudo apt install php-xdebug
php7.4 --ini
php --ini
/etc/php/7.4/mods-available/xdebug.ini
/etc/php/8.0/mods-available/xdebug.ini
/etc/php/7.4/mods-available/xdebug.ini
; zend_extension=xdebug.so
zend_extension=/usr/lib/php/20190902/xdebug.so
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 9003
/etc/php/8.0/mods-available/xdebug.ini
; zend_extension=xdebug.so
zend_extension=/usr/lib/php/20200930/xdebug.so
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 9003
php7.4 -v
php -v
sudo apt install mlocate
locate xdebug.so
php7.4 -i
php -i
PHP Debug extension
ctrl+shift+D
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
// "-dxdebug.mode=debug",
// "-dxdebug.start_with_request=yes",
"-S",
"localhost:8000",
"-t",
"public"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
},
{
"name": "php7.4Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeExecutable": "php7.4",
"runtimeArgs": [
// "-dxdebug.mode=debug",
// "-dxdebug.start_with_request=yes",
"-S",
"localhost:8000",
"-t",
"public"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
"runtimeExecutable": "php7.4", //should use php7.4 version
"runtimeArgs": [
// "-dxdebug.mode=debug",
// "-dxdebug.start_with_request=yes",
"-S",
"localhost:8000", //similar to php7.4 artisan server
"-t",
"public" //should server this folder
],