Skip to content

Instantly share code, notes, and snippets.

@emrahoruc
Created March 30, 2022 10:29
Show Gist options
  • Save emrahoruc/29c2f5baf9fce71183b870e4ceeb5177 to your computer and use it in GitHub Desktop.
Save emrahoruc/29c2f5baf9fce71183b870e4ceeb5177 to your computer and use it in GitHub Desktop.
PHP 7.4 + Xdebug 3.1 + Vscode
{
// 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:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
[XDebug]
zend_extension = "C:/laragon/bin/php/php-7.4.28-Win32-vc15-x64/ext/php_xdebug-3.1.3-7.4-vc15-x86_64.dll"
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 9003
xdebug.client_host = "127.0.0.1"
xdebug.log = "C:/laragon/bin/php/php-7.4.28-Win32-vc15-x64/ext/xdebug.log"
xdebug.idekey = VSCODE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment