Skip to content

Commit b3e6ce5

Browse files
NadiyaSmeker12
andauthored
Extend description of debugging CLI command on Pro Staging and Production (magento#6934)
Added instructions for using required Xdebug php config file to debug CLI commands on Pro Production and Staging environments. Co-Authored-By: Margaret Eker <[email protected]>
1 parent 3382dfb commit b3e6ce5

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/cloud/howtos/debug.md

+14-5
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,22 @@ To debug CLI commands:
317317
export PHP_IDE_CONFIG="serverName=<name of the server that is configured in PHPSTORM>"
318318
```
319319

320-
These variables are removed when the SSH session ends. When adding the variables, you can add runtime options:
320+
These variables are removed when the SSH session ends.
321321

322-
```bash
323-
php -d xdebug.profiler_enable=On -d xdebug.max_nesting_level=9999 ...
324-
```
322+
1. Begin debugging
323+
324+
On Starter environments and Pro Integration environments, run the CLI command to debug.
325+
You may add runtime options, for example:
325326

326-
If you expect to use SSH and debug multiple times, you can put the export commands into a bash script in the `/tmp` directory to run them each time.
327+
```bash
328+
php -d xdebug.profiler_enable=On -d xdebug.max_nesting_level=9999 bin/magento cache:clean
329+
```
330+
331+
On Pro Staging and Production environments, you must specify the path to the Xdebug php configuration file when debugging CLI commands, for example:
332+
333+
```bash
334+
php -c /etc/platform/USERNAME/php.xdebug.ini bin/magento cache:clean
335+
```
327336

328337
## For debugging web requests {#webrequests}
329338

0 commit comments

Comments
 (0)