How do I trigger Xdebug from within a Vagrant's SSH via CURL? -


so have vagrant-driven instance, running 2 projects, , works swimmingly. project has server instance, , client instance. communicate on rest ... , there too.

so, have xdebug set correctly - know this, because if call laravel client instance using cli curl outside homestead, passing ?xdebug_session_start=vagrant, picks in phpstorm , can debug normal:

curl -v http://clientproject.dev?xdebug_session_start=vagrant 

now, if make exact same call, within homestead's cli (i.e. i've ssh'd vagrant box, , run curl command shown above), doesn't trigger. makes no sense me

i've scoured net without joy, , i'm hoping fine citizens have come across this?

i'm wanting can have server instance call client instance xdebug cookies in development, makes debugging easier developers.

okay, after digging around , understanding bit more how xdebug works, realised wasn't working, because xdebug work, originating call must take place on same machine ide.

because making curl call inside homestead vm, xdebug making way ide.

to correct this, have set header in curl call, so:

curl -v http://myclient.dev?xdebug_session_start=vagrant --header "x-forwarded-for: 192.168.10.01" 

where of course, 192.168.10.01 ip of vagrant's host machine, i.e. ide resides.

all working now!


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -