Skip to content

Instantly share code, notes, and snippets.

@abidkhan484
Created May 6, 2024 09:10
Show Gist options
  • Save abidkhan484/afe6713604be8ba970cf60d8053e697d to your computer and use it in GitHub Desktop.
Save abidkhan484/afe6713604be8ba970cf60d8053e697d to your computer and use it in GitHub Desktop.
php xdebug with docker

docker-php-ext-xdebug.ini

zend_extension=xdebug.so
xdebug.cli_color=1
xdebug.show_local_vars=1
xdebug.idekey=VSCODE
xdebug.max_nesting_level=300
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=0
xdebug.remote_handler=dbgp
xdebug.remote_host=172.17.0.1
xdebug.remote_port=9009
xdebug.client_host=172.17.0.1
xdebug.client_port=9009
xdebug.connect_timeout_ms = 200
xdebug.force_display_errors = 1
xdebug.force_error_reporting = 1
xdebug.log = /tmp/xdebug.log 
xdebug.log_level = 7
xdebug.mode = debug,develop
xdebug.output_dir = /tmp
xdebug.start_with_request=yes

launch.json

  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9009,
      "log": true,
      "externalConsole": false,
      "pathMappings": {
        "/var/www": "${workspaceRoot}/src"
      },
      "ignore": ["**/vendor/**/*.php"]
    }
  ]
}```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment