Skip to content

Instantly share code, notes, and snippets.

@twfahey1
Created May 16, 2022 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twfahey1/9ca2e38aa28142fbe28775e00b4218be to your computer and use it in GitHub Desktop.
Save twfahey1/9ca2e38aa28142fbe28775e00b4218be to your computer and use it in GitHub Desktop.
XDebug configuration in VS Code

Turn up the vars!

  • Open up launch.json - My favorite way is via Cmd + Shift + P for command pallette, type "launch.json", and there it is!
  • Set in the xdebugSettings key for the php Xdebug settings - Generally we should be able to port over settings in XDebug (Link), e.g.:
{
  // XDebug Launch Configuration settings
  "launch": {
    "version": "0.2.0",
    "configurations": [
      // Listener mode (recommended for most cases)
      // Can be used to debug both: web and cli PHP sessions.
      {
        "name": "XDebug (listener)",
        "type": "php",
        "request": "launch",
        "port": 9000,
        "xdebugSettings": {
          "max_data": 1500,   //set a proper number.
          "max_children": 25000,
        }
      },
      
   ... etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment