I recently reinstalled PHP, and noticed that xdebug would not work from within phpstorm.
Getting the message “Connection was not establish”.
The way to fix that, was just to ensure that we’re using the proper port.
Xdebug 3.x, uses port 9003. Where as Xdebug 2.x used 9000.
To fix this, change your phpStorm preferences for the listening port to 9003.
PhpStorm -> Settings -> PHP -> debug -> port and set to 9003.
One thought on “phpstorm unable to establish connection with xdebug”
Thank you. It helped