-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Confusing XDBUG documentation #381
Comments
I must admit I'm having similar issues, and I'm not able to use xdebug on vscode. |
I have to admin the Xdebug documentation still has lots of potential. I made a major rewrite of this a few weeks ago, but its not yet in an easy and understandable shape. I will dig into how to get this working with VSCode. |
I got it working, but just found it a little difficult to piece it together. |
Here's how I got it working in VSCODE, very similar to my original solution here: #209 XDebug.ini PHP.ini ; ; Timeouts ; Uploads ; Vars ; Error reporting VSCode Launch.json for XDebug |
I changed the pathMappings suggested with since it seems that |
Struggled to get xdebug working, on Mac OS X (mojave), and Docker Desktop.
And give it a name in /etc/hosts
Supported by invocation on boot:
xdebug can now connect to realhost Can also add it to
|
Thanks for all the input. I am in the process of consolidating and simplifying the current Xdebug documentation and keep you posted as soon as the first PR is created. |
Fixes #381 Rewrite and simplify Xdebug documentation
Xdebug documentation@sonicviz @masiorama @keithy @drupalshift @ToolOwner I have completely rewritten the Xdebug documentation and made sure it is as simple and straight forward as possible.
If anything is still unclear or not working, please comment again and I will re-open |
Awesome, ty! |
Hello folks, I finally managed to make Xdebug work on Windows 10 Home Edition, PHP 7.4 and VS Code. TLDR; devilbox\cfg\php-ini-7.4\xdebug.ini
devilbox\docker-compose.override.yml
launch.json
I was stuck with the following error message : VS Code complains that "Error: listen EADDRINUSE: address already in use :::9000" After some digging, it seems that PHP-FPM uses port 9000 and now Xdebug 3 uses port 9003 as a default. Secondly, I struggled finding the host IP, with reference to 3.2.3.4.1.2. Gather Host IP address. I do not have the "virtual switch manager" nor do I have a "default switch" connection. From the php container, I can ping the host with the ip on my local LAN, or the "Ethernet adapter vEthernet (WSL)". In a different thread, I see the host is not conveniently assigns a DNS name "host.docker.internal", but it is not resolved by the PHP container. In docker-compose.yml, I can see docker.for.lin.host.internal is statically assigned to 172.16.238.1 and pings go through, so that is what I used. Finally, the documentation refers to Xdebug 2.0 configuration that needs to be tranlated to XDebug 3.0. It may still be valid for older version of PHP though. This is the documentation I used. |
Here is a walk through for PHPStorm and xdebug on Linux Ubuntu, Hope it helps. |
@georgesreti I followed your exact instructions but I am having the |
@masiorama my config still works. One of the problems I had was with port
9000 being already used. Your error message on the other hand indicates
port 9003 being already used. I would start by finding what is using port
9003 in your configuration. Start fresh if you have to. Good luck!
…On Thu, Oct 28, 2021 at 6:04 AM masiorama ***@***.***> wrote:
@georgesreti <https://github.com/georgesreti> I followed your exact
instructions but I am having the
"Error: listen EADDRINUSE: address already in use :::9003"
on port 9003, and then I have no clue how to go on.
Does the configuration still work for you?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#381 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZHOXK52RNS6VI46CETBYDUJEU5JANCNFSM4FVUK6AQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Georges
|
I think that documentation isn’t up to date with version 3 of XDebug ?
This doc tells us for example to use https://xdebug.org/docs/upgrade_guide To work properly I think for me in vscode / macos, I had to use xdebug.mode = debug
xdebug.start_with_request = yes
; The MacOS way
#xdebug.discover_client_host=0
xdebug.client_host=10.254.254.254
xdebug.client_port=9003
; idekey value is specific to Visual Studio Code
xdebug.idekey=vsc Note that
|
ISSUE TYPE
SUMMARY
https://devilbox.readthedocs.io/en/latest/intermediate/configure-php-xdebug/editor-vscode.html#configure-php-xdebug-editor-vscode
It says PHPSTORM, not what the IDE key for Visual Studio code should be. Same issue with sublime.
eg: Ensure that xdebug.idekey is set to PHPSTORM in your PHP Xdebug configuration.
Goal
What is the IDE key for VSCode -> mac-cain13/xdebug-helper-for-chrome#89
VSCODE
Also found the XDBUG documentation a little confusing with multilayered clickthroughs that make you quickly lose track of what you are doing. It would be simpler and more direct to have it on a single page with references at the bottom in my view.
The text was updated successfully, but these errors were encountered: