Skip to content

Instantly share code, notes, and snippets.

@developerck
Created January 12, 2024 03:05
Show Gist options
  • Save developerck/cd55bec7e1944461869517d54359d1cc to your computer and use it in GitHub Desktop.
Save developerck/cd55bec7e1944461869517d54359d1cc to your computer and use it in GitHub Desktop.
xdebug3_ docker_vscode_conf.md
xdebug setup 7.4
    pecl install xdebug-3.1.6
    docker-php-ext-enable xdebug
add in xdebug.ini file
  [xdebug]
  xdebug.mode=develop,debug
  xdebug.client_port = 9095 ## any port number which is exposed
  xdebug.discover_client_host = 1
  xdebug.idekey = VSCODE
  xdebug.start_with_request = yes
  xdebug.log =/tmp/xdebug.log

in vscode launch.json

** path mapping is execution path vs codebase path

{
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9005,
        "log": true,
        "pathMappings": {
            "/var/www/html/":"${workspaceRoot}/src" 
        }

    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment