Skip to content

Latest commit

 

History

History
97 lines (63 loc) · 3.6 KB

XDEBUG.md

File metadata and controls

97 lines (63 loc) · 3.6 KB

What is this?

This document contains basic information how you can use Xdebug and PhpStorm within this application.

And before you start with this section off documentation you really should read PhpStorm configuration documentation first - that way you will have all basic configuration ready.

Table of Contents

Configuration and usage

These instructions relies heavily to screenshots, so you might need to use your own brains for some parts of these instructions - but I bet you can get this working in couple of minutes.

PhpStorm basic configuration

  1. Make sure that Xdebug port is 9003
  2. Validate debugger configuration
  3. Install needed browser extensions

You can check all those within screen as below:

Basic settings

Note that validation screen should look like image below:

Validation

Create Run/Debug Configuration like in image below:

Run/Debug Configuration

First connection

After you have make sure that all basic things are configured properly you can start to listen incoming PHP debug connections. After this you need to do following:

  1. Add breakpoint to your code
  2. Enable Xdebug in your browser
  3. Reload browser page

After that you should see following:

Incoming connection from Xdebug

And in this screen select the correct index.php file.

Configuring debugging server

Last step is to configure used paths on debugging server to match with your local paths. See the image below:

Path mappings

Debug CLI commands

By default this application assumes that you're using app.localhost as your PHP server that you've configured to your IDE. If you need to change that, just override that in your local compose.override.yaml file.

See those External links / resources on this documentation to get more information.

Debug Postman requests

If you're using Postman to test / debug your application you need to add ?XDEBUG_SESSION_START=PHPSTORM to each URL that you use with Postman.

External links / resources

Closure

Happy debugging \o/ - it has not ever be as easy as this...


Back to resources index - Back to main README.md