Debug Websocket connections with XDebug
Hi,
my environment is:
- Ubuntu 16.04
- Docker with Apache2 and PHP7.1
- PHPStorm 2017.2.4
I have XDebug properly configured for my project and I'm able to debug incoming HTTP connections. The problem is that I'm not able to debug Websocket connetions. I have websocket PHP server (http://socketo.me/) running in the same docker container as Apache, but listening on different port. Is there ability to listen for both and debug both?
Best regards,
Adam
Please sign in to leave a comment.
Hi there,
>Is there ability to listen for both and debug both?
What do you mean exactly?
It's xdebug that connects to IDE and not other way around. IDE listens on single xdebug port.
First collect xdebug log (xdebug.remote_log) and show what's happening there. Maybe it tries to make additional debug connection while one is already active .. and your IDE settings have default 1 max concurrent debug sessions. If that's the case -- just increase that limit to 3 (IDE settings, use search field and look for "xdebug" -- hard to miss).