Skip to content

WAGO/vscode-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vscode-server

Microsoft Visual Studio Code server is supported from firmware 27. For older firmware on 32-bit devices use packages provided in this repo. There are currently two methods to connect remote from the VS-Code IDE; with the Remote SSH extension or with the Remote Tunnels extension.

See also issues and discussion section.

Note!

VS-Code will download the server bits and need enough space. Also we need some space for apps and extensions. A good way to start is the default 'admin' user-space (not root).

PFC300 or Edge Controller is prefered because these devices provides enough CPU power and RAM for the connection. Other devices will also work, but are slower to connect etc.

Prerequisite

Install the ipk's in Web Based Management (WBM) software upload tab (select 'force install' if notified).

Can be skipped for FW >= 27.

If we want to use the the remote SSH extension (instead of tunneling) we must change the settings for SSH-server Dropbear:

nano /etc/dropbear/dropbear.conf

Then enable for 'local port forwarding':

LOCAL_PORT_FORWARDING=true

Save the file and restart controller (or restart dropbear).

Connect with SSH

Open VS-Code and install 'Remote - SSH' extension. Guideline is found in the extension.

https://code.visualstudio.com/docs/remote/ssh

Connect with tunnels

Open VS-Code and install 'Remote - Tunnels' extension. Guideline is found in the extension.

Download and unpack the cli-server from microsoft.com, then start the tunnel as admin:

./code tunnel

https://code.visualstudio.com/docs/remote/tunnels

Nice to know about

Exension usage:

Various settings:

Exampels:

Tunnel as a service

Create a tunnel as described in this repo then make a startup script of your own.

touch /etc/init.d/vscode && chmod +x /etc/init.d/vscode

Add symlink:

ln -s /etc/init.d/vscode /etc/rc.d/S99_z1_vscode

Edit 'vscode' script with this content:

cd /home/admin
su -c './code tunnel --accept-server-license-terms' admin

Reboot the controller and test the connection.