Skip to content

Instantly share code, notes, and snippets.

@yannbertrand
Created December 6, 2016 15:04
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save yannbertrand/305df17ac8a70c77c1a85e2f873fdfa5 to your computer and use it in GitHub Desktop.
Save yannbertrand/305df17ac8a70c77c1a85e2f873fdfa5 to your computer and use it in GitHub Desktop.
Using xDebug with POSTMAN

Set the url with ?XDEBUG_SESSION_START=PHPSTORM and set a header Cookie: XDEBUG_SESSION=PHPSTORM

@nikunjacharya
Copy link

Same here. Trying with XDEBUG_SESSION_START=XDEBUG_ECLIPSE as GET parameter and XDEBUG_SESSION=XDEBUG_ECLIPSE as Cookie, but not working in chrome or in postman.

@axelitus
Copy link

axelitus commented Feb 27, 2019

There is no need to add both, either one should work (either the QueryString parameter or the Header).

@ronaldroe
Copy link

I know this is super old, but the answer is XDEBUG_SESSION=VSCODE

@re-rizaldywirawan
Copy link

@ronaldroe thank you for the answer, it's work!

@czoka
Copy link

czoka commented Nov 17, 2022

I know this is super old, but the answer is XDEBUG_SESSION=VSCODE

it might be on old thread but it sure helps to have it up to date (it is pretty high in the google results). Saved me a lot of time looking around. Thanks 😄

@hendra-jti
Copy link

I know this is super old, but the answer is XDEBUG_SESSION=VSCODE

it might be on old thread but it sure helps to have it up to date (it is pretty high in the google results). Saved me a lot of time looking around. Thanks smile

mine still doesnt work, may you share launch config in vscode for the xdebug ?

@raffaele-capasso
Copy link

raffaele-capasso commented Mar 9, 2023

@hendra-jti

Here it is:

{
   // 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,
            "pathMappings": {
                "/var/www/html": "${workspaceFolder}"
            }
        }
   ]
}

Please, change the pathMappings in according with your environment.

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