@@ -79,7 +79,7 @@ For example, if a project I'm working on is in `/home/robert/wwww/pugdebug` and
7979The ` Host ` setting should be the IP address of the machine on which pugdebug runs. In most cases
8080it is perfectly fine to leave this field blank.
8181
82- The ` Port ` setting is the port number on which Xdebug will attempt to connect to the machin on
82+ The ` Port ` setting is the port number on which Xdebug will attempt to connect to the machine on
8383which pugdebug runs. The default port is ` 9000 ` .
8484
8585The ` IDE Key ` setting allows to filter out messages from Xdebug based on this value.
@@ -91,44 +91,62 @@ about variables is retrieved from Xdebug.
9191
9292## debugging sessions
9393
94- To start a debugging session , click the " Start" button in the top left corner (Shortcut: F2 ).
94+ To start debugging, click the ` Start listening ` button in the top left corner (shortcut: ` F1 ` ).
9595
96- Load your web project in your browser and start a
96+ pugdebug then listens to all connections on the ` Port ` provided, and if the connection has
97+ the ` IDE Key ` matching with what is configured, it will start debugging the PHP request from
98+ that connection.
99+
100+ In the case if there is already a debugging in progress, the new connection will be queued
101+ and once the debugging of the current connection is done, the new one will be debugged.
102+
103+ This allows pugdebug to debug multiple requests (think ajax).
104+
105+ Load a web project in a browser and start a
97106[ HTTP debugging session] ( http://xdebug.org/docs/remote#browser_session ) .
98107
99- pugdebug should pick up that session and display the index file of your web
108+ pugdebug should pick up that request and display the index file of the web
100109project, while stopping the execution on the first line.
101110
102- Using the ` Run ` , ` Over ` , ` In ` , ` Out ` continuation commands you can step through
103- your PHP code.
111+ Using the ` Run ` ( ` F5 ` ) , ` Over ` ( ` F6 ` ) , ` In ` ( ` F7 ` ) , ` Out ` ( ` F8 ` ) continuation commands allows
112+ stepping through the PHP code.
104113
105114Setting breakpoints is possible by double clicking the line where a breakpoint
106- should be placed .
115+ is needed .
107116
108117The correspoding line number should be highlighted and a new breakpoint should
109118be listed in the breakpoint viewer (bottom right corner).
110119
111120Double clicking the line with a breakpoint should remove that breakpoint.
112121
122+ The ` Stop ` (` F3 ` ) action will stop debugging the current request and tell Xdebug to
123+ stop further execution of the PHP script that is being debugged.
124+
125+ The ` Detach ` (` F4 ` ) action will detach the debugger from the current request, which
126+ allows to stop debugging but also let the PHP script finish as it normally would.
127+
128+ The ` Stop listening ` (` F2 ` ) action will tell pugdebug to stop listening
129+ to new incomming connections.
130+
113131## debugging cli scripts
114132
115133It is also possible to debug CLI scripts with pugdebug.
116134
117- Start pugdebug as stated in the previous section, click ` Start ` to
118- start a debugging session and then in a new terminal type:
135+ Start pugdebug as stated in the previous section, click ` Start listening ` to
136+ start listening to incomming connections and then in a new terminal type:
119137
120138```
121139export XDEBUG_CONFIG="idekey=pugdebug"
122140```
123141
124- (or whatever you set the ` xdebug.idekey ` setting to) and then start
125- your PHP CLI script normally:
142+ (or whatever the ` xdebug.idekey ` setting is set to) and then start
143+ the PHP CLI script normally:
126144
127145```
128146php script.php
129147```
130148
131- pugdebug should pick up the debugging session and let you debug your script .
149+ pugdebug should pick up the debugging session and allow the script to be debugged .
132150
133151## todo
134152
0 commit comments