Skip to content

Conversation

@brettins
Copy link
Contributor

Xdebug 3 no longer uses the remote_ convention, they have been removed in Xdebug 3.
Need XDEBUG_MODE: debug for step debugging

Added sample launch.json for .vscode

These changes are all for Ubuntu 20.04, so maybe the different configs could be separated out?

Xdebug 3 no longer uses the remote_ convention, they have been removed in Xdebug 3. 
Need XDEBUG_MODE: debug for step debugging

Added sample launch.json for .vscode

These changes are all for Ubuntu 20.04, so maybe the different configs could be separated out?
with Xdebug v3.0.2, Copyright (c) 2002-2021, by Derick Rethans
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These extra blank lines must be removed.

moved comments around
`Fenced code blocks should have a language specified`
remote_handler=dbgp
```
In VSCode, alongside the default php config in `launch.json`, you'll need path mappings for a docker image.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to add IDE specific related configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for 99% of the docs that is definitely the case, but in the case of debugging, particularly step debugging, it is inherently tied to an IDE. Before my modifications there were already specifics things to php storm in this doc, and there are mentions of php storm and vs code in the recommended IDEs for API Platform. Docker is also recommended, and this path mapping is a quirk of docker and API platform together.

If the intent is to be IDE agnostic, then there likely shouldn't be recommendations to use php storm and vs code elsewhere.

For me, knowing this config info would have saved me a few hours, and this doesn't clutter up the docs much.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of having docs for VSCode and PHPStorm as it's the two most popular tools in the PHP world.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then 😄

remote_port=9000
idekey=PHPSTORM
client_host=host.docker.internal
client_port=9003
Copy link
Member

@alanpoulain alanpoulain Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this line is necessary. This is the default port for Xdebug 3.

Copy link
Contributor Author

@brettins brettins Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to remove it, but the line I'm replacing remote_port=9000 was also an unnecessary line, as the default port for Xdebug 2 was 9000 - I'm not sure if the intent was to just be informative?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know but I think it's safe to remove it.

brettins and others added 3 commits March 26, 2021 10:01
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
removed reduntant port setting
Co-authored-by: Alan Poulain <contact@alanpoulain.eu>
@brettins brettins requested review from alanpoulain and dunglas March 29, 2021 15:45
@alanpoulain
Copy link
Member

Thank you @brettins!

@alanpoulain alanpoulain merged commit dfb5ef6 into api-platform:2.6 Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants