Using VSCode for Remote Coding

Using VSCode for Remote Coding

Daily short news for you
  • Indeed, there's nothing that wizards can't come up with. awk is a very powerful command for processing files; it can read, search, summarize... text data. Especially for system log files, you just have to call it with... a command.

    jgarzik/sqawk takes the use of awk to "new heights". It applies SQL syntax for querying as well 😆.

    » Read more
  • I forgot to mention that I promised to share my thoughts with everyone after switching to Safari, and just two days later, I had to go back to Chrome. Why?

    First, I would like to point out a few things I liked about Safari, such as its extremely simple interface, which truly focuses on real web browsing, and I found its speed to be on par with Chrome. Additionally, one feature I really enjoyed was the ability to "hide" certain elements you don't like on a particular webpage. This feature is called Hide Distracting Items.

    However, I began to discover some shortcomings when opening Dev Tools—the space that helps developers debug their websites. I must say it was quite basic. It seems that Safari is not designed for debugging. I spent a while trying to figure out how to view the data being sent through the API, or even how to see a fully printed Object from console.log!?

    That alone is enough of a reason for me to return to Chrome. Perhaps Safari is very focused on privacy and security, which makes it difficult to fulfill these requests. On the flip side, if you are doing regular web browsing, you might really enjoy Safari!

    » Read more
  • Let's take a look back at the 30-year journey of JavaScript from its first appearance in 1995 to 2025.

    30 years, the same age as myself 🥱. I've read many blogs about JavaScript, but it seems that Deno is very determined to revive JavaScript once again. They are actively working to reclaim the name JavaScript for the community instead of letting Oracle hold it without doing anything over the years.

    » Read more

The Issue

There are times when you need to edit files directly on a server to participate in debugging or development. This process typically involves SSHing into the server, navigating to the project directory, using command-line editors like nano or vim to open files, and making edits. If you're a Vim enthusiast, you can turn it into a powerful text editor, but for others, Vim might be challenging to use.

In VSCode, there is an extension called Remote - Tunnels that allows you to directly open a project on a server while still utilizing all the features of VSCode. This means you can have syntax highlighting, code highlighting, and most of the extensions installed in your code editor. In today's article, let me guide you through the process.

Setup Steps

First, install the Remote - Remote - Tunnels.

Then click on the Remote button with two arrows in the lower-left corner of the screen.

Bước 1

Choose "Connect to Host" and then select "Add new SSH host" if you haven't added any configurations before.

Bước 2

An input box appears, requesting information to SSH into the server. For example, I log in as [email protected]:

Bước 3

Here, since I have set up SSH using an SSH key, VSCode automatically uses the key in my machine. If you don't have a key or log in with a password, you'll need to enter the password each time you "Connect to Host."

After entering the information, a new window will open to notify you that you have successfully connected to the server. Click on the "Open Folder" button to browse to your project folder, and then click "OK" to start writing code.

Buoc 4

In my opinion, besides coding, this method allows you to manage the files and folders created by the project during runtime. Additionally, you can commit directly from here, but be cautious as it may lead to unintended issues.

Premium
Hello

The secret stack of Blog

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (0)

Leave a comment...