Problem adding PHP remote interpreter (vagrant): "Vagrant Instance Not Running" (but it is running)

I'm trying to get xdebug working in PHPStorm 8.0.3 inside my Vagrant box. 

I've got Vagrant running. I can use Tools-->Vagrant--Up to start up Vagrant. The vagrantfile is in the root directory of the project. I know it's working, because I can access the site in my browser via localhost:8888.

While following instructions to get xdebug working, one thing I need to do is set up a remote interpreter for PHP. So, Preferences-->Languages & Frameworks->PHP, then click the three dots next to Interpreter, then the plus sign, then choose Remote..., then vagrant.

It spins for a bit, then gives me an error popup "Vagrant Instance Not Running - Do you want to launch vagrant instance at (path to my project)?" If I click yes, it comes right back with the same error message.

If I go to my terminal, navigate to my project root, then type "vagrant ssh", I get right in.

0
4 comments

It's not really likely, but please confirm that vagrant status reports that the VM is running.

If it does, please add #com.jetbrains.php to Help | Debug Log Settings, restart PhpStorm, try to add the interpreter again and then collect and upload the IDE log somehwere.

On a side note, you can configure the interpreter via SSH directly, vagrant:vagrant@localhost:2222.

Also, since you're running a site there, why would you need a remote interpreter? Aren't you going to run your code with the web server in the VM?

0
Avatar
Permanently deleted user

Ok, log is here.

Also, vagrant status confirms vagrant is running.

As for your question about needing a remote interpreter: I'm trying to get xdebug working within PHPStorm for the site that's running in the VM. I'm following the steps outlined on this page

0

Oh wow, you're using 8.0.3 on Oracle JDK. Please uninstall your PhpStorm version and install it back using this installation. Is it better?

I'm following the steps outlined on this page.

OK, now I can say for sure you don't need the remote interpreter at all. The page describes it for no reason.

What you need is to disable xdebug.remote_connect_back, set appropriate xdebug.remote_host (it should be an IP the VM can use to connect to the host machine), and then follow this guide to start a debugging session:

https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

0
Avatar
Permanently deleted user

Ok, that worked...thanks! You were right - no need for the remote interpreter. 

0

Please sign in to leave a comment.