You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and prefix-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.
zend_extension=xdebug
[xdebug]
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=1
xdebug.client_port=9003
xdebug.log="/tmp/xdebug.log"
xdebug.client_host=172.17.0.1 # for linux boxes, mac/windows use host.docker.internal
Xdebug logs this, but the debugger somehow isn't realizing that it should use /var/www/http to look up its own files
[27] [Step Debug] <- breakpoint_set -i 6 -t line -f file:///home/box/src/hello.php -n 31
[27] [Step Debug] WARN: Breakpoint file name does not exist: /home/box/src/hello.php (No such file or directory).
one of the initial jsonrpc message logs looks roughly similar to the config in the launch.json:
There is two ways of doing it, ether let vscode-php-debug run on the local machine or remote.
On the local machine: Run adapter: xdebug command-cwd "~/" prefix-local "/docker:my-docker-container:"
command-cwd "~/" Make sure that xdebug node adapter starts on local machine
prefix-local "/docker:my-docker-container:" Substitutes the docker prefix in emacs paths with ""
Dape has some capabilities to automatically add prefix-local with dape-default-config-functions but it does so if command-cwd is remote, which it is not. Therefore we need to do it manually.
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: