Skip to content

Commit 36fcdd0

Browse files
authored
docs: Do not ask the user to change default Xdebug2 port (#642)
1 parent cb091b7 commit 36fcdd0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This extension is a debug adapter between VS Code and [Xdebug](https://xdebug.or
2323
**_I highly recommend you make a simple `test.php` file, put a `phpinfo();` statement in there, then copy the output and paste it into the [Xdebug installation wizard](https://xdebug.org/wizard.php). It will analyze it and give you tailored installation instructions for your environment._** In short:
2424

2525
- On Windows: [Download](https://xdebug.org/download.php) the appropriate precompiled DLL for your PHP version, architecture (64/32 Bit), thread safety (TS/NTS) and Visual Studio compiler version and place it in your PHP extension folder.
26-
- On Linux: Either download the source code as a tarball or [clone it with git](https://xdebug.org/docs/install#source), then [compile it](https://xdebug.org/docs/install#compile).
26+
- On Linux: Either download the source code as a tarball or [clone it with git](https://xdebug.org/docs/install#source), then [compile it](https://xdebug.org/docs/install#compile). Or see if your distribution already offers prebuilt packages.
2727

2828
2. [Configure PHP to use Xdebug](https://xdebug.org/docs/install#configure-php) by adding `zend_extension=path/to/xdebug` to your php.ini. The path of your php.ini is shown in your `phpinfo()` output under "Loaded Configuration File".
2929

@@ -41,7 +41,7 @@ This extension is a debug adapter between VS Code and [Xdebug](https://xdebug.or
4141
```ini
4242
xdebug.remote_enable = 1
4343
xdebug.remote_autostart = 1
44-
xdebug.remote_port = 9003
44+
xdebug.remote_port = 9000
4545
```
4646

4747
There are other ways to tell Xdebug to connect to a remote debugger, like cookies, query parameters or browser extensions. I recommend `remote_autostart` (Xdebug v2)/`start_with_request` (Xdebug v3) because it "just works". There are also a variety of other options, like the port, please see the [Xdebug documentation on remote debugging](https://xdebug.org/docs/remote#starting) for more information. Please note that the default Xdebug port changed between Xdebug v2 to v3 from 9000 to 9003.
@@ -61,6 +61,8 @@ In your project, go to the debugger and hit the little gear icon and choose _PHP
6161
- **Launch Built-in web server**
6262
This configuration starts the PHP built-in web server on a random port and opens the browser with the `serverReadyAction` directive. The port is random (localhost:0) but can be changed to a desired fixed port (ex: localhost:8080). If a router script is needed, add it with `program` directive. Additional PHP/Xdebug directives trigger debugging on every page load.
6363

64+
There are also configurations for Xdebug v2 (Legacy) installations.
65+
6466
More general information on debugging with VS Code can be found on https://code.visualstudio.com/docs/editor/debugging.
6567

6668
#### Supported launch.json settings:

0 commit comments

Comments
 (0)