vscode remote debugging

https://www.jianshu.com/p/0f2fb935a9a1

Introduction

Recently VScode released the remote development plug-in for remote programming and debugging. This plug-in can be used in many cases instead of vim to directly modify and debug the code on the server remotely. It also has code highlighting and completion functions, just like using VScode locally. . Finally, there is no need to configure the vim plug-in over and over on the server side.

The configuration process is very simple. This article describes how to connect to a remote machine through ssh. In addition, the plug-in also provides the function of connecting to WSL and container.

Remote configuration process

  1. Install ssh-server on remote host


    Choose the installation method according to the local OS
  2. Install ssh-client on the local host


    Choose the installation method according to the local OS
  3. Install vscode. Now the official version can use this plug-in like the beta version.

  4. Install the Remote Development plugin


    Install plugin
  5. Automatically open the command line window when logging in, open the setting Remote-SSH-Settings through ctrl+shift+p, and set Remote.SSH: Show Login Terminal to true


    Set up
  6. Connect to the remote host After
    installing the plug-in, a green icon will appear in the lower left corner, click to select and several options will pop up in the command window


    Choose SSH

    Select Remote-SSH: Connect to Host->Configure SSH Hosts->Select a config


    Select config

    After that, the configuration config information will come out. Host is the name I gave to this configuration file, HostName is the IP address of the remote host, and User is the login name.
    Enter your own information

    Save after input, the configured information will appear on the left, right click to log in.
    Select host
  7. Choose a password to log in, you need to enter the password on the command line to log in


    Interface after login

Guess you like

Origin blog.csdn.net/liqiang12689/article/details/104351507