Fix #209 documentation for PHP Xdebug on Windows

This commit is contained in:
cytopia 2019-03-09 12:10:27 +01:00
parent e36e88127d
commit 4e41e64308
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
8 changed files with 179 additions and 33 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,3 @@
.. figure:: /_includes/figures/xdebug/windows/ipconfig.png
Windows: ipconfig example output

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,3 @@
.. figure:: /_includes/figures/xdebug/windows/virtual-switch-manager.png
Windows: Virtual Switch Manager example screenshot

View File

@ -30,23 +30,56 @@ about common Xdebug options.
* :ref:`php_ini`
* :ref:`configure_php_xdebug_options`
Gather DockerNAT IP address
---------------------------
Gather Host IP address
----------------------
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.246.1``)
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
.. seealso:: :ref:`howto_open_terminal_on_win`
Only one of the options may be valid for your setup.
DockerNAT IP address
--------------------
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.246.1`` is meant as an example and will eventually differ on your system.
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
-------------------------
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Assumption
==========
@ -64,7 +97,9 @@ For the sake of this example, we will assume the following settings and file sys
+------------------------------+------------------------------------------+
| Selected PHP version | ``5.6`` |
+------------------------------+------------------------------------------+
| DockerNAT IP address | ``192.168.246.1`` |
| DockerNAT IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
| Virtual Switch IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
The **Resulting local project path** is the path where all projects are stored locally on your
@ -140,7 +175,7 @@ Copy/paste all of the following lines into the above created ``xdebug.ini`` file
; The Windows way
xdebug.remote_connect_back=0
xdebug.remote_host=192.168.246.1
xdebug.remote_host=192.168.0.12
; idekey value is specific to Atom
xdebug.idekey=xdebug.atom

View File

@ -30,23 +30,56 @@ about common Xdebug options.
* :ref:`php_ini`
* :ref:`configure_php_xdebug_options`
Gather DockerNAT IP address
---------------------------
Gather Host IP address
----------------------
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.246.1``)
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
--------------------
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
-------------------------
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst
.. important::
``192.168.246.1`` is meant as an example and will eventually differ on your system.
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Assumption
==========
@ -64,7 +97,9 @@ For the sake of this example, we will assume the following settings and file sys
+------------------------------+------------------------------------------+
| Selected PHP version | ``5.6`` |
+------------------------------+------------------------------------------+
| DockerNAT IP address | ``192.168.246.1`` |
| DockerNAT IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
| Virtual Switch IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
The **Resulting local project path** is the path where all projects are stored locally on your
@ -129,7 +164,7 @@ Copy/paste all of the following lines into the above created ``xdebug.ini`` file
; The Windows way
xdebug.remote_connect_back=0
xdebug.remote_host=192.168.246.1
xdebug.remote_host=192.168.0.12
; idekey value is specific to PhpStorm
xdebug.idekey=PHPSTORM

View File

@ -30,23 +30,56 @@ about common Xdebug options.
* :ref:`php_ini`
* :ref:`configure_php_xdebug_options`
Gather DockerNAT IP address
---------------------------
Gather Host IP address
----------------------
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.246.1``)
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
--------------------
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
-------------------------
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst
.. important::
``192.168.246.1`` is meant as an example and will eventually differ on your system.
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Assumption
==========
@ -64,7 +97,9 @@ For the sake of this example, we will assume the following settings and file sys
+------------------------------+------------------------------------------+
| Selected PHP version | ``5.6`` |
+------------------------------+------------------------------------------+
| DockerNAT IP address | ``192.168.246.1`` |
| DockerNAT IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
| Virtual Switch IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
The **Resulting local project path** is the path where all projects are stored locally on your
@ -138,7 +173,7 @@ Copy/paste all of the following lines into the above created ``xdebug.ini`` file
; The Windows way
xdebug.remote_connect_back=0
xdebug.remote_host=192.168.246.1
xdebug.remote_host=192.168.0.12
; idekey value is specific to Sublime
xdebug.idekey=sublime.xdebug

View File

@ -30,23 +30,56 @@ about common Xdebug options.
* :ref:`php_ini`
* :ref:`configure_php_xdebug_options`
Gather DockerNAT IP address
---------------------------
Gather Host IP address
----------------------
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.246.1``)
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
--------------------
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
-------------------------
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst
.. important::
``192.168.246.1`` is meant as an example and will eventually differ on your system.
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Assumption
==========
@ -64,7 +97,9 @@ For the sake of this example, we will assume the following settings and file sys
+------------------------------+------------------------------------------+
| Selected PHP version | ``5.6`` |
+------------------------------+------------------------------------------+
| DockerNAT IP address | ``192.168.246.1`` |
| DockerNAT IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
| Virtual Switch IP address | ``192.168.0.12`` |
+------------------------------+------------------------------------------+
The **Resulting local project path** is the path where all projects are stored locally on your
@ -156,7 +191,7 @@ Copy/paste all of the following lines into the above created ``xdebug.ini`` file
; The Windows way
xdebug.remote_connect_back=0
xdebug.remote_host=192.168.246.1
xdebug.remote_host=192.168.0.12
; idekey value is specific to Visual Studio Code
xdebug.idekey=VSCODE