Skip to content

PHPStorm

On Tap Cloud DX supports remote development using PHPStorm.

Connecting to your Cloud DX Server

  1. In the initial project browser, expand "Remote Development" and click on the "SSH" option...
  2. Click on the "New Connection" button.
  3. Enter "ontap" into the "Username" field.
  4. Enter your Cloud DX Server's IP address into the "Host" field (which can be found on your onboarding email).
  5. Click on the "Specify private key" checkbox, and make sure the relevant key is selected.
  6. Your window should look similar to this...
  7. Click on the "Check Connection and Continue" button.
  8. You will eventually see...
  9. Ensure that the "IDE version" is set to a version that matches closely "PhpStorm 2022.3". Please note, IDE versions of 2023 are not currently supported.
  10. Enter your project's directory, which will be something like /home/ontap/projects/project-name.
  11. Click on the "Download IDE and Connect" button.
  12. PhpStorm now installs and connects to the remote server.

Please note:

  • Once you have done the above process once for your Cloud DX Server, then most of these steps will be skipped.
  • It is normal to receive "high load" warnings when you connect to a project for the first time, since the PhpStorm server-side software indexes the entire site. It normally takes a few minutes only.

Using Xdebug

  1. Inside your project directory, execute the command dx xdebug on.
  2. You can start debugging by using the menu option Run → Start Debugging (also available on the keyboard shortcut F5).
  3. Now insert a breakpoint somewhere, for example in pub/index.php...
  4. In the bottom right of the window, click on the PHP Debug icon, which will initially look like this...
  5. The icon will change to this...
  6. Now load up the website in your web browser.
  7. This should trigger an "Incoming Connection From Xdebug" popup...
  8. Click on the "Accept" button.
  9. You should now see the code breakpoint has been triggered...

Turning Xdebug off

Performance is affected whilst Xdebug is enabled. Therefore, it is good practice to disable it when you do not need to debug. You can do that by executing the command dx xdebug off.