I've got a php project contained in vagrant.. I've successfully connected to the debugger.. or so I thought.
I setup some breakpoints in the codebase, but the only code that halts is the phpunit code running locallly on my own machine. Never halts on the ZF2 code.
I never did the file mapping, and honestly a little confused about it.. I have no error messages and unsure what to check/fix
I do see a check mark on my breakpoint(s) ..
but seeing at the end of PHPUnit execution a status code = 1.. my guess is that is because the test case has failed.. not xdebug or something like that.
"Settings | PHP | Servers" -- there is "Validate remote environment" button that will help with detecting if xdebug is configured properly enough.
Please explain. It's confusing.
If you are running PHPUnit tests remotely .. then what it has to do with running locally?
But you should do path mappings for debugging (especially) if you debug remote code.
Andriy , thank you for your tips.
I did some more research and realized the Project Settings is TOTALLY not the `File->Default Settings` ... not very clear to someone new to PHPStorm that it's tucked under `PHPSTORM->Preferences`
I verified the remote server successfully!
Using an `in place` server
Local path to create validation script = ~/projectroot/public
Loaded php.ini /etc/php5/apache2/php.ini
Loaded : Xdebug 2.2.5
Remote Host: localhost
Remote mode `req` is enabled ...
I'm concerned about that Remote Host setting, shouldn't that be the IP address of the Vagrant box? it's 192.168.x.x
I have breakpoints residing in some code (it's an Apigility aka ZendFramework2 project if it matters, but I doubt it)
The code is responding properly, as if it visited my code area.
However, the code is not breaking on the break point(s)... causing me to miss the chance to debug.
The PHPUnit Tests can run on the remote box OR inside PHPStorm's host environment. I've tried both and neither halts.. I'll go through your links and report back on my progress. Thanks again.
My fortunes have changed after that initial realization about the project settings. Thanks again.. it's currently working as expected and halted!