Skip to content

Commit 2e68fa7

Browse files
authored
Merge pull request #378 from ByteInternet/remote_debugging_cli_example
docs: Add CLI example to remote debugging
2 parents 7b6528f + c0bdbd6 commit 2e68fa7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/hypernode-platform/php/remote-debugging.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ JetBrains has way more knowledge and information on this topic, so we advise you
8888
- [Remote debugging via SSH tunnel](https://www.jetbrains.com/help/phpstorm/remote-debugging-via-ssh-tunnel.html)
8989
- [Debug with PhpStorm: Ultimate Guide](https://www.jetbrains.com/help/phpstorm/debugging-with-phpstorm-ultimate-guide.html)
9090

91+
### Enabling Xdebug for the CLI
92+
93+
After enabling Xdebug, the CLI will not load the module by default.
94+
To load it, you can set the `PHP_INI_SCAN_DIR` environment variable to the specific Xdebug-enable config directory:
95+
96+
```console
97+
app@abcdef-example-magweb-cmbl:~$ export PHP_VERSION=$(jq -r .php_version /etc/hypernode/app.json)
98+
app@abcdef-example-magweb-cmbl:~$ export PHP_INI_SCAN_DIR=/etc/php-debug/$PHP_VERSION/cli/conf.d/
99+
app@abcdef-example-magweb-cmbl:~$ php -m | grep xdebug
100+
xdebug
101+
```
102+
91103
## Varnish bypass
92104

93105
While remote debugging works with Varnish enabled, you might want to bypass Varnish when debugging.

0 commit comments

Comments
 (0)