I recently made the switch from Vagrant to Lima-VM with my Trellis setup. With Vagrant, I was using the Ray app (along with the WordPress-specific plugin) for debugging PHP, and it worked well. With Lima, I can’t get it to work.
Now if I add some Ray logging in my code, e.g. in
functions.php I have
ray('hello world'); I should see ‘hello world’ echoed in the app, but nothing shows up.
My limited understanding is that by default the Ray package communicates with the Ray desktop app via port
23517 in the VM.
Based off of this reference in the Lima repo, I tried creating a file at
trellis/.trellis/cli.yml with the following:
portForwards: - guestPort: 23517
But that doesn’t seem to have had any effect; the Ray app still isn’t receiving data.
Currently my ray.php config file looks like this
<?php return [ /* * Whether data should be sent to Ray. */ 'enable' => true, /* * The host used to communicate with the Ray app. */ 'host' => '127.0.0.1', /* * The port number used to communicate with the Ray app. */ 'port' => 23517, /* * Absolute base path for your sites or projects in Homestead, Vagrant, Docker, or another remote development server. */ 'remote_path' => null, /* * Absolute base path for your sites or projects on your local computer where your IDE or code editor is running on. */ 'local_path' => null, /* * When this setting is enabled, the package will not try to format values sent to Ray. */ 'always_send_raw_values' => false, ];
With Vagrant I had the
'host' => '10.0.2.2' but I changed it to try and get it working with Lima.
Wondering what is the proper way to forward a specific port in the Lima guest so that messages can be received by an external host app?