Debugger configuration for Symfony on a Laravel/Homestead virtual

I'm getting an error trying to validate my debug set up.  Here's what I'm using:

  1. PHPStorm 1.2018.4 on Mac OS High Sierra.
  2. A Laravel/Homestead virtual run via Vagrant.
  3. Symfony 4.0 project, root locally at /User/MYACCOUNT/projects/Symfony4/symfony-01.
  4. Local directory is mounted on the virtual as /home/homestead/symfony-01.
  5. Using php 7.2, fpm, via nginx with root of /home/vagrant/symfony-01/public
  6. php.ini for 7.2 is set up
  7. Vagrant box is networked as 192.168.10.10, with my host Mac as 192.168.10.1.
  8. php.ini is set up as per the instructions on the PHPStorm confluence wiki, xdebug.remote_host=192.168.10.1

Symfony comes up on my mac at 192.168.10.10, so the default Homestead set up looks valid.  But when I try the validate button, I get this (pretty uninformative) error:

"Specified URL is not reachable, caused by symfony-01.local (...)  [note: this is defined in /etc/hosts and maps to 192.168.10.10]

>>>
Validation script was created but it cannot be executed, check possible reasons:
  * Configured 'Url to validation script' is incorrect
  * Validated Web Server is not running.
  * Target directory for validation script is not public.

<<<

Settings on the dialog:

"Remote webserver"

"Path to create validation script:  /Users/MYACCOUNT/projects/Symfony4/symfony-01/public/"

Settings for the deployment host:

Connection:

  • "Local or mounted folder"
  • "Upload/download:  /Users/MYACCOUNT/projects/Symfony4/symfony-01"
  • "Webserver root URL: http://symfony-01.local"

Mapping:

  • Local path: /Users/MYACCOUNT/projects/Symfony4/symfony-01
  • Deployment path on server: public
  • Web path on server: /
  • Project URL:  http://symfony-01.local/

I'm puzzled by the errors, which are not helping me see what exactly is the problem with these settings.  How do I proceed?

 

0
4 comments
Avatar
Vladimir Luchansky

Hello,

Things are pretty straightforward - we upload the script to the configured path then we try to access it via URL+script name.

In general, we need to upload scripts to a web server root so it could be ran from there. Maybe nginx is the issue here?

More details on what's going on under the hood can be achieved by configuring debug log collection for PHP events via https://intellij-support.jetbrains.com/hc/en-us/articles/207241115-How-to-Collecting-PhpStorm-WebStorm-debug-Logs and then reproducing the issue and checking over Help > Show Log in ... > idea.log.

0

It has the same error "handshake alert" - ummmm ok, so wtf does that mean and how do I fix it?

0

We need to know when exactly it happens. Please upload the IDE log somewhere after you reproduce the issue again.

0

I found a comment on a java specific thread that said that error could be generated by a bad certificate. The server in question was a dev box and the self-signed certificate on it had expired and it's key never added to the virtualbox's global ca files. So I generated a new key and crt (two sets actually - one to represent a 'fake' but local authority, one for the server configuration itself), added the [local/fake] authority key/crt to the virtual machine's ca registry and modified the apache2 config to point to the new host crt before restarting. At that point I was able to get more useful errors regarding my path mappings, corrected those and eventually got the debugging to stop on a proper breakpoint highlighting the line of code as desired.

0

Please sign in to leave a comment.