To perform debugging remotely using SSH, make sure that Lycia VS Code Extension has been installed both on the client computer and on the remote host.
For this example we’ll be using VS Code extension called Remote - SSH.
Step 1. Run your VS Code instance, go to the Extensions area:
Step 2. In the search bar in the upper-left corner of VS Code window, type the extension’s name:
Step 3. Find this extension in the Extensions: Marketplace, click the Install button:
Step 4. After the extension has been installed, open the Command Palette by selecting View → Command Palette or using the shortcut CTRL + SHIFT + P. From the dropdown list, select the Add New SSH Host option provided by Remote - SSH extension:
Step 5. Enter the IP or DNS in the Command Palette, and press ENTER:
Step 6. A new dialog prompt will appear in the lower-right corner of VS Code’s window. Click the Open Config button:
VS Code will open the configuration file in the Editor:
Step 7. Add username and password (the remote server must be configured for connection using login and password):
Step 1. Go to File → Preferences → Settings. In the search bar, type Lycia web, and find the setting called Lycia: Debug: Default Webserver:
Step 2. Click the Edit in settings.json link in the setting to open the settings.json file. Add the IP or DNS to the row with lycia.debug: DefaultWebserver setting:
Step 1. Call the Command Palette again and select Connect to Host option provided by Remote - SSH extension:
In the next prompt, select your host from the dropdown list:
The window with VS Code instance on remote host will open:
Step 2. You will receive a prompt to enter the password, type it in and press ENTER. Then open the Workspace folder as shown at the Layout and Interface page.
Step 3. You might get a prompt to enter the password again (this is needed to connect to the file system of your remote server). Enter the password, press ENTER. Now LVSCE will have access to the host’s file system.
Step 4. Find the program you need to debug in your FGL Project Explorer, right-click it and select the Build/Deploy option:
Step 5. Click this program’s 4GL file to open it in the Editor. Set a breakpoint in your code where you need it:
Go to the FGL Project Explorer. Right-click the program and select Debug as Web Application:
The program will run in the browser in Debug mode. The remote VS Code instance will open the Run and Debug area, which you can also access at any time from the Activity Bar:
To learn remote debugging process in dynamic, watch the following video:
See next: Clean, Build, Rebuild, Deploy