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.
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.
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.
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.
- From the EXTENSIONS pane, install Kubernetes and Bridge to Kubernetes extensions.
- 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.
- Right-click on Workloads/Pods/ and select the Attache Visual Studio Code menu item.
- From the newly launched VS Code, select the EXPLORER pane and click on the Open Folder button.
- Select the folder, /opt/padogrid/workspaces/myrwe/myws/.
Attaching to PadoGrid Docker Container
Docker
- Select the REMOTE EXPLORER pane.
- SElect Containers from the pulldown in the upper right corner of the REMOTE EXPLORER pane.
- Find your PadoGrid container from the CONTAINERS pulldown, i.e., /CONTAINER/Dev Container/.
- Right-click on your container and select the Attach to Container option.
- The newly launched VS Code should show your PadoGrid container.
◀️ JupyterLab :link: Eclipse ▶️