JetBrain's Remote Debugging Setup is the Bane of My Existence!!!

I used phpStorm a good bit around two years ago and at the time ran into a number of issues configuring the debugging - both local and remote. More recently I've had cause on a new system with a new test server etc. to use phpStorm again and I am again facing craze-inducing frustrations configuring the remote debugging.

A quick Google search will show I'm not the only one who struggles with this. The part that is frustrating me at the moment is the Validate Debugger Configuration on Web Server in which it keeps telling me "Path to the validation directory is invalid" - which is particularly unhelpful.

I have a connection to the remote server all setup, I can see it and browse it in the remote host window, but when I click on ... on the right right of Path to create validation script: I'm only shown my local machine. Why doesn't it show me the remote server? I've entered every validation path I can think of with no luck AND I've also successfully placed a file in the folder I've marked as validation path and it is showing up just fine, no 404.

:-( I like JetBrain's products but this one thing drives me absolutely nuts!

1 comment

So I've tried for the last few hours (add that to the days I have spent previously) trying to get the remote debugger working. I've finally gotten it working, here are the last perhaps 1 hr. of working and how I finally got it to do something right...but it really, really, really shouldn't be this hard. :-(

  1. Have a DigitalOcean Ubuntu Droplet running Apache, MySQL, PHP, and Xdebug
  2. I finally decided to use SSH tunneling to try and get as many variables besides PhpStorm and the remote droplet out of the way.
  3. I was still having issues so I installed artbek's Chrome Xdebug extension and was able to successfully connect to the remote server's Xdebug.
  4. I've finally gotten PhpStorm at least talking to Xdebug but now we come to the debugging issue.
  5. I have Xdebug Helper installed in my Chrome browser as well, and I set that to debug.
  6. In PhpStorm I click on Start Listening for PHP Debug Connections.
  7. Back in my browser I refresh my remote server page and the Incoming Connection From Xdebug message appears.
  8. If I try Importing mappings from deployment it complains that "No suitable deployment configurations was found"
  9. So I switch the radio button to "Manually choose local file or project". (See image 1 below)
  10. As one can see the file path being requested is /var/www/html/index.php, so I'm going choose C:\VersionControl\wordpress-4.9.2\wordpress\index.php, Ready to debug? Nope, the PhpStorm event log shows the following:
  11. "Debug session was finished without being paused
    It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
    To figure out the problem check path mappings configuration for 'test.liquidchurch.com' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu)." (See Image 2)
  12. So lets take a look at my server mappings, as we can see the project files path is not mapped, so I add that mapping. (See image 3)
  13. I again refresh the page in my browser and again am greeted with the message outlined in 11 above (see image 2).
  14. I proceed to add breakpoints at several points throughout my project code and refresh the page again...and it works.

 

0

Please sign in to leave a comment.