Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update debugging.md #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
alanpoulain merged 8 commits into api-platform:2.6 from brettins:patch-1
Mar 30, 2021
Merged

Update debugging.md #1323

alanpoulain merged 8 commits into api-platform:2.6 from brettins:patch-1
Mar 30, 2021

Conversation

@brettins
Copy link
Contributor

@brettins brettins commented Mar 25, 2021

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.

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

@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 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.

dunglas reacted with thumbs up emoji
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

@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.

Ok then 😄

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

@alanpoulain alanpoulain Mar 26, 2021
edited
Loading

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
edited
Loading

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

@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 know but I think it's safe to remove it.

brettins and dunglas reacted with thumbs up emoji
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>
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

Reviewers

@alanpoulain alanpoulain alanpoulain approved these changes

@dunglas dunglas Awaiting requested review from dunglas

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /