Debug PHP from VisualCode on Ubuntu server.

Sebastian Velez Zuluaga
2 min readNov 24, 2020

In this article I would like to resume the steps that this link provide:

https://code.visualstudio.com/docs/remote/ssh#_getting-started

  1. Install VisualCode.
  2. Install Remote ssh extension por VisuaCode
  3. You will need to install remote server on Ubuntu from this link you can choose the version and your architecture.

https://code.visualstudio.com/docs/remote/troubleshooting#_installing-a-supported-ssh-server

Run all command with the root user, in this cases works

sudo su

4. Connect VisualCode with the extension ssh-remote press F1 and type ssh, select connect to host, configure the string and test it.

5. Install on your visual this extension Xdebug

6. Go the wizard page, create a file test.php with one phpinfo() inside.

7. Follow the steps, remember use you root user.

8. Very importan in the final step add to in the php.ini

[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1

9. Connect your VisualCode with your server, select some breakpoint and test it.

AWESON !

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response