Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion docs/hypernode-platform/php/remote-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ If you're not using Xdebug cloud, you need to open a reverse SSH tunnel so that
$ ssh -R 9003:localhost:9003 app@example.hypernode.io -N
```

### Configure PhpStorm
### IDEs

#### PhpStorm

Then you open up your PhpStorm project and go to your *File -> Settings -> PHP -> Servers*. Click the *+* button to add a server and fill *Name* and *Host* with the full domain name of the site you want to debug (for example www.shop.com). Then check the box *Use path mappings* and click on the right column next to your project root. Here you can fill in the absolute path of the application on the remote server, for example:

Expand All @@ -72,6 +74,29 @@ Finally click the *Start Listening for PHP Debug Connections* button. Now your d

![](_res/phpstorm-listen-for-debug.png)

#### Visual Studio Code

If you prefer Visual Studio Code, you can use the PHP Debug extension. Create or update `.vscode/launch.json` in your project with the following configuration and adjust `pathMappings` to your remote application path:

```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/data/web/releases/1767778825": "${workspaceRoot}"
}
}
]
}
```

After saving, open the *Run and Debug* panel, choose **Listen for XDebug**, and start listening for incoming debug connections on port 9003.

### Start debugging

To start debugging, make sure you have the Xdebug helper extension enabled in your browser:
Expand Down