VS Code - padogrid/padogrid GitHub Wiki

◀️ JupyterLab :link: Eclipse ▶️


VS Code is an Eclipse-based IDE for developing applications in many popular languages such as Java, Python, R, C#, C/C++, Go, Ruby, PHP, etc. PadoGrid automatically integrates workspaces with VS Code, allowing the user to run PadoGrid inside VS Code.

Command Description
open_vscode Open the specified workspace in VS Code

Installing VS Code

To install VS Code, please follow the instructions provided in the following link.

Install VS Code

You can verify the installation by running the code executable. The PadoGrid VS Code commands will fail if the code executable is not found.

macOS

For macOS, to add the code executable to PATH, from VS Code, run the "Shell Command: Install 'code' command in PATH" command (available through the Command Palette, Shift-Command-P).

jq

The open_vscode command requires the jq executable available from the following link. Please add it to PATH.

Install JQ

Running VS Code

Once VS Code is installed, you can use the open_vscode to start VS Code with the specified PadoGrid workspace integrated.

# Start VS Code with the current workspace
open_vscode

# Start VS Code with the specified workspace
open_vscode -workspace myws

# Start VS Code with the specified rwe and workspace
open_vscode -rwe myrwe -workspace myws

# Initialize VS Code with the specified rwe and workspace without opening it
open_vscode -init -rwe myrwe -workspace myws

For a workspace, in addition to the workspace folder, open_vscode also adds all of the component folders, i.e., clusters, apps, docker, k8s, and pods.

For an rwe, in addtion to the RWE folder, open_vscode also adds all of the workspace folders.

PadoGrid in VS Code

Attaching to PadoGrid K8S Pod

You can attach VS Code to a Kubernetes pod or service and do remote development. Once attached, you can remotely change and debug code in the pod. There are a number of ways to enable remote debugging. For our example, we install the Kubernetes extensions as follows.

  1. From the EXTENSIONS pane, install Kubernetes and Bridge to Kubernetes extensions.
  2. From the KUBERNETES pane, find the Kubernetes cluster and the namespace that has your PadoGrid pod. Right-click on the namespace and select the Use Namespace menu item.
  3. Right-click on Workloads/Pods/ and select the Attache Visual Studio Code menu item.
  4. From the newly launched VS Code, select the EXPLORER pane and click on the Open Folder button.
  5. Select the folder, /opt/padogrid/workspaces/myrwe/myws/.

PadoGrid Docker in VS Code

Attaching to PadoGrid Docker Container

Docker

  1. Select the REMOTE EXPLORER pane.
  2. SElect Containers from the pulldown in the upper right corner of the REMOTE EXPLORER pane.
  3. Find your PadoGrid container from the CONTAINERS pulldown, i.e., /CONTAINER/Dev Container/.
  4. Right-click on your container and select the Attach to Container option.
  5. The newly launched VS Code should show your PadoGrid container.

PadoGrid Docker in VS Code


◀️ JupyterLab :link: Eclipse ▶️