repright.blogg.se

Phpstorm docker node debug
Phpstorm docker node debug








phpstorm docker node debug

phpstorm docker node debug

call some simple URL on your local test web server or alike - this kind of thing) Are you able to make outgoing connection from inside the docker to your host OS (e.g.a common mistake is to port forward/expose Xdebug port as if it's an incoming connection). Maybe your Docker image has some bad bindings (e.g.Try using numeric IP instead of (in case it may point to the wrong address, although you have added the extra_hosts line) - see ip a kind of output (or whatever you have there).Could be IPv6 vs Pv4 as well (try sticking to IPv4 to check, see to which IP is resolved).Some kind of firewall / networking rule.Could be how rootless Docker deals with networking (cannot help here at all).Right now it looks like Xdebug cannot make an outgoing connection for some reason. TBH I do not have much concrete ideas (as I'm on Windows, rarely work with Docker and when I do it just works in those images). I thought there was a problem with local port 9003 so I tried to switch the xdebug of my non-dockerized project to 9003 and also set Storm to listen to 9003 only, and the break happens. W: Creating socket for ':9003', poll success, but error: Operation now in progress (29). I: Connecting to configured address/port: :9003. I can't see these files but as writing doesn't seem to be a problem, I took a wild guess and tried accessing my xdebug log and it worked!! it says: Log opened at 15:16:50 In my script I did some file_put_contents() and some fwrite() to /tmp, everything seems fine but in CLI, in my container I can't find the files that are supposed to have been created. He mentions rootless docker but at least he seems to have some logs. The mention of "rootless docker" is his last comment.

phpstorm docker node debug

This guy is having a similar sort of issue. Just a random thought that helped me in the past. That's in case if you are executing the wrong URL or file was not updated there. print IP or server name etc (something unique that will allow you to differentiate one system from another).

#Phpstorm docker node debug code#

I'm sure it went through it as it was right before my phpinfo() which appears on screen.Īlways add some unique code that can confirm that it is run on the right system. I also tried to place a xdebug_break() in the code. Too bad you have to stick to Xdebug v2 - v3 has easier ways of troubleshooting. You need Xdebug log to confirm what it is doing. Check this one (not sure if it will help with container though). In those threads where I was suggesting it (and that was ordinary system, not virtual) it was helping. but going to mention it anyway ( sudo setsebool -P httpd_can_network_connect=1 ). I do not think you have SELinux or alike in Docker containers. using fwrite() or alike)? To check that it can write there.Ģ. So I tried /tmp/xdebug but it doesn't work either.ġ. Given that xdebug configs are almost identical between my local server and my Docker container, that Storm debug validation is successful on both servers, that my Storm for the project in Docker catches the xdebug connection when I load the project on my local server (although as an external connection since it's not from the Docker server address), I'm guessing something is lost somewhere inside Docker but I'm not really sure anymore. Here is my xdebug config on Docker container: xdebug xdebug support I run Docker in rootless mode but when I go to Build, Execution, Deployment>Docker and configure my Docker, the connection is successful. When I try to validate my debug configuration in Storm for the docker version, is found and everything is ok. I compared the xdebug configuration in phpinfo between my local server and the container, both are strictly identical (except for remote_host, it's localhost on my local server, and the log paths). Now, when I run the exact same project with Docker, everything works fine but my breakpoint doesn't trigger anything. When I set up PHP>Debug and validate my configuration for xdebug, it is ok.When I enable Chrome xdebug extension and start listening for debug connections in Storm, my breakpoint (at the very start of the page execution) is catched and I can debug. I can run the project on a local apache+php5.6+xdebug2.5.5 and it works fine. I'm working on a project running on PHP 5.6, with cakePHP. I'm on ubuntu 20, runing the latest stable PHPStorm.










Phpstorm docker node debug