Debug an app with XDebug
Edit on GitHubThis document describes how to set up and use XDebug to debug your app.
Keep in mind that the steps described here may vary slightly depending on your specific development environment; however, they should still assist you in setting up XDebug for debugging in most scenarios.
Set up DockerSDK with XDebug
To start a testing container with XDebug enabled (disabled in the default container), execute the following command:
docker/sdk testing -x
Configure PHPStorm for XDebug
To configure PHPStorm for XDebug, do the following:
- In PHPStorm, go to Preferences → PHP → Servers.
- Click the
+
sign to add a new configuration with the following details:- Name: spryker
- Host: spryker.local
- Enable the Use path mappings option, selecting it based on whether the server is remote or if symlinks are used. For example, map the path from
/path/to/root/of/the/app
to/data
. - Click
Apply
and thenOK
to save the configuration.
PHPStorm is now ready to accept XDebug connections, allowing you to debug your app using XDebug.
Thank you!
For submitting the form