Skip to content

Commit 055ea38

Browse files
committed
Clarified use of the XDEBUG_SESSION cookie
1 parent db39934 commit 055ea38

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

html/docs/include/features.php

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,12 +1096,18 @@ function calls but also function calls made more levels up and down.
10961096
with normal php.ini settings.</li>
10971097
10981098
<li>If you want to debug a script started through a web browser, simply add
1099-
<code>XDEBUG_SESSION_START=session_name</code> as parameter to the URL. Refer
1100-
to the <a href="#browser_session">next section</a> to read on how debug
1101-
sessions work from within a browser window.</li>
1102-
1103-
<li>Another way to activate the debugger while running PHP through a web server is by installing one of the following three browser extensions.
1104-
Each of them allows you to simply enable the debugger by clicking on one button.
1099+
<code>XDEBUG_SESSION_START=session_name</code> as parameter to the URL.
1100+
Instead of using a GET parameter, you can also set XDEBUG_SESSION_START as a
1101+
POST parameter, or through a cookie. Refer to the <a
1102+
href="#browser_session">next section</a> to read on how debug sessions work
1103+
from within a browser window.</li>
1104+
1105+
<li>An alternative way to activate the debugger while running PHP through a web
1106+
server is by installing one of the following four browser extensions. Each of
1107+
them allows you to simply enable the debugger by clicking on one button. When
1108+
these extensions are active, they set the XDEBUG_SESSION cookie directly,
1109+
instead of going through XDEBUG_SESSION_START as described in
1110+
<a href="#browser_session">HTTP Debug Sessions</a> further on.
11051111
11061112
The extensions are:
11071113
<a name="browser-extensions"></a><a name="firefox-ext"></a>
@@ -1233,11 +1239,12 @@ function calls but also function calls made more levels up and down.
12331239
Xdebug contains functionality to keep track of a debug session when started
12341240
through a browser: cookies. This works like this:
12351241
<ul>
1236-
<li>When the URL variable <code>XDEBUG_SESSION_START=name</code> is appended to
1237-
an URL Xdebug emits a cookie with the name "XDEBUG_SESSION" and as value the
1238-
value of the XDEBUG_SESSION_START URL parameter. The expiry of the cookie is
1239-
one hour. The DBGp protocol also passes this same value to the init packet
1240-
when connecting to the debugclient in the "idekey" attribute.</li>
1242+
<li>When the URL variable <code>XDEBUG_SESSION_START=name</code> is appended
1243+
to an URL—or through a POST variable with the same name—Xdebug emits a cookie
1244+
with the name "XDEBUG_SESSION" and as value the value of the
1245+
XDEBUG_SESSION_START URL parameter. The expiry of the cookie is one hour. The
1246+
DBGp protocol also passes this same value to the init packet when connecting
1247+
to the debugclient in the "idekey" attribute.</li>
12411248
<li>When there is a GET (or POST) variable XDEBUG_SESSION_START or the
12421249
XDEBUG_SESSION cookie is set, Xdebug will try to connect to a debugclient.</li>
12431250
<li>To stop a debug session (and to destroy the cookie) simply add the URL

0 commit comments

Comments
 (0)