-
Notifications
You must be signed in to change notification settings - Fork 37
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
PHP Xdebug on a docker container? #183
Comments
Hey, Im glad that you enjoy dape. There is two ways of doing it, ether let On the local machine:
Dape has some capabilities to automatically add This is probably always what the user want 🤔 |
Thanks for the response. I'm able to reproduce the same results as above--phpDebug.js is able to talk to xdebug, but xdebug is warning me that the breakpoint file does not exist, as it's on a docker container.
I know on vscode, the launch.json needs the
doesn't seem to have an effect. I also forgot how I got jsonrpc message logs unfortunately. If you have ideas about how to debug deeper I can try that. |
I think I need to see the contents of Set Also where is your source code kept and what is directory is PHP started from? |
Let me try that and possibly set up a sample project and get back to you. I want to make this as easy as possible on your end. |
Hi, I really like this package! I used your config for local php debugging and it works great. I really appreciate all your work svannte!
Now I'm trying to get php debugging working through a docker container. I saw your notes on
prefix-local
andprefix-remote
. But maybe I'm not using it right?tl;dr somehow xdebug is looking for the breakpoint on my host environment, rather than inside the docker container; can't find it, so even though the connection is made, no breakpoints trigger.
I have the setup working through vscodium, and I have it alllmosttt working in dape. The issue appears that the path mapping between the docker container and my local directory's source code isn't working. For this setup, the container and my source code are on the same physical machine.
If there's more info I can provide that would help let me know. If you want a minimally reproducible config with a docker setup, that might take me some time but I can do it.
What I've tried
I looked at #127 #36 #23 for clues. I've looked at the dape events for jsonrpc output, and to my knowledge, I'm setting the config correctly and passing in
pathMappings
with the correct properties.xdebug.ini
It's loaded and working on the container.
Breakpoints snag in vscodium with this config
This is a config in the launch.json
Xdebug logs this, without error:
The dape config
Xdebug logs this, but the debugger somehow isn't realizing that it should use
/var/www/http
to look up its own filesone of the initial jsonrpc message logs looks roughly similar to the config in the launch.json:
Not sure where to debug further. Would love to know if someone else has got this working.
The text was updated successfully, but these errors were encountered: