|
1 | 1 | # pugdebug |
2 | 2 |
|
3 | | -pugdebug is a standalone debugging client for PHP applications that uses XDebug as the debugging engine. |
| 3 | +pugdebug is a standalone debugging client for PHP applications that uses Xdebug as the debugging engine. |
4 | 4 |
|
5 | 5 | A python 3.4, PyQt5 project. |
6 | 6 |
|
@@ -43,60 +43,10 @@ for Fedora, Ubuntu, Windows and OSX. |
43 | 43 | There is also a [blog post](http://robertbasic.com/blog/install-pyqt5-in-python-3-virtual-environment) |
44 | 44 | about setting up a virtual environment on a Fedora that goes into bit more details. |
45 | 45 |
|
46 | | -## setting up xdebug |
| 46 | +## setting up Xdebug |
47 | 47 |
|
48 | | -To be able to debug PHP with pugdebug, you need to have [xdebug](http://xdebug.org/docs/remote) |
49 | | -propely set up for remote debugging. |
50 | | - |
51 | | -A minimal configuration would be something like: |
52 | | - |
53 | | -``` |
54 | | -xdebug.idekey=pugdebug |
55 | | -xdebug.remote_enable=1 |
56 | | -xdebug.remote_port=9000 |
57 | | -xdebug.remote_host=127.0.0.1 |
58 | | -``` |
59 | | - |
60 | | -If the project you want to debug is in a vagrant virtual machine, your xdebug |
61 | | -config should be something like: |
62 | | - |
63 | | -``` |
64 | | -xdebug.idekey=pugdebug |
65 | | -xdebug.remote_enable=1 |
66 | | -xdebug.remote_port=9000 |
67 | | -xdebug.remote_connect_back=1 |
68 | | -``` |
69 | | - |
70 | | -Do note that when debugging CLI scripts from a vagrant virtual machine, the |
71 | | -`remote_connect_back` setting will not work, and we need to use the |
72 | | -`remote_host` setting. The xdebug configuration should look something like: |
73 | | - |
74 | | -``` |
75 | | -xdebug.idekey=pugdebug |
76 | | -xdebug.remote_enable=1 |
77 | | -xdebug.remote_port=9000 |
78 | | -xdebug.remote_host=33.33.33.1 |
79 | | -``` |
80 | | - |
81 | | -You can find the IP address to use for the remote host setting by issuing the |
82 | | -following command on the host machine: |
83 | | - |
84 | | -``` |
85 | | -ip addr |
86 | | -``` |
87 | | - |
88 | | -and a part of the output will include something like this: |
89 | | - |
90 | | -``` |
91 | | -6: vboxnet2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000 |
92 | | - link/ether 0a:00:27:00:00:02 brd ff:ff:ff:ff:ff:ff |
93 | | - inet 33.33.33.1/24 brd 33.33.33.255 scope global vboxnet2 |
94 | | - valid_lft forever preferred_lft forever |
95 | | - inet6 fe80::800:27ff:fe00:2/64 scope link |
96 | | - valid_lft forever preferred_lft forever |
97 | | -``` |
98 | | - |
99 | | -and from there we can see the IP address of `33.33.33.1`. |
| 48 | +There is a wiki page with [simple examples of Xdebug configurations](https://github.com/robertbasic/pugdebug/wiki/Setting-up-Xdebug) |
| 49 | +that should help with setting up Xdebug for remote debugging. |
100 | 50 |
|
101 | 51 | ## using pugdebug |
102 | 52 |
|
@@ -129,15 +79,15 @@ For example, if a project I'm working on is in `/home/robert/wwww/pugdebug` and |
129 | 79 | The `Host` setting should be the IP address of the machine on which pugdebug runs. In most cases |
130 | 80 | it is perfectly fine to leave this field blank. |
131 | 81 |
|
132 | | -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 machin on |
133 | 83 | which pugdebug runs. The default port is `9000`. |
134 | 84 |
|
135 | | -The `IDE Key` setting allows to filter out messages from xdebug based on this value. |
| 85 | +The `IDE Key` setting allows to filter out messages from Xdebug based on this value. |
136 | 86 |
|
137 | 87 | `Break at first line` tells the debugger should it break on the first line or not. |
138 | 88 |
|
139 | 89 | `Max depth`, `Max children` and `Max data` settings control the amount of information |
140 | | -about variables is retrieved from xdebug. |
| 90 | +about variables is retrieved from Xdebug. |
141 | 91 |
|
142 | 92 | ## debugging sessions |
143 | 93 |
|
|
0 commit comments