IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only

Discover the Perfect Coding Companion for IBM i: Visual Studio Code

By Nirmal Khatri posted 6 hours ago

  

For decades, IBM i development was dominated by green-screen interfaces. While effective, many developers and architects sought a more modern, versatile development environment. Visual Studio Code (VS Code) has emerged as a powerful alternative—free, open-source, and exceptionally flexible. This article demonstrates why VS Code is an excellent tool for IBM i developers and how to integrate it into your workflow. 

 

What is VS Code? 

Microsoft Visual Studio Code is a lightweight, open-source code editor favored by developers across industries. Its core strengths include: 

  • A clean, customizable UI 

  • Support for a wide range of programming languages 

  • Built-in debugging tools 

  • Integrated Git version control 

  • A vast ecosystem of extensions 

Its extensibility and cross-platform compatibility make it ideal for enterprise environments. 

 

Installing VS Code 

  1. Download the latest version from the official Visual Studio Code site. 

  1. Select your OS and install it. 

  1. Once installed, launch VS Code. 

 

IBM i Prerequisites 

Before connecting VS Code to IBM i, ensure the following are configured on your system: 

  • SSH enabled on IBM i. 

  • Node.js installed via Yum or Access Client Solutions (ACS). 

  • OpenSSH server installed and running. 

  • Optional: .vscode/tasks.json to define compile or custom remote actions. 

 

Adding IBM i Support with Extensions 

To enable IBM i development, install the “Code for IBM i extension: 

  1. Open the Extensions panel (icon with four squares). 

  1. Search for Code for IBM i. 

  1. Click Install. 

  1. Once installed, a dedicated IBM i icon appears in the activity bar. If not, restart VS Code. 

 

Connecting to IBM i

  1. Click the IBM i icon. 

  1. Choose Connect to an IBM i or use the “+” icon. 

  1. Enter your connection details (hostname, user profile, password). 

  1. Click Connect. VS Code will authenticate and establish a secure SSH session. 

Tip: Ensure your user profile has the necessary authorities for development activities. 

 

IBM i Development Features in VS Code 

User Library List 

Manage your library list dynamically: - Add libraries using the “+” button. - Reorder libraries. - Set a current library via right-click > Change Current Library. 

Object Browser 

Filter and explore objects:  

  1. Click Create New Filter and provide: - Filter Name (any descriptive name) - Library (e.g., MYLIB) - Object (e.g., *, Q*) - Object Type (e.g., *PGM, *SRVPGM, *SRCPF) - Member (e.g., *CL, CL*ABC*) - Member Type (e.g., RPGLE, SQL*LE)  
  2. Click Save Settings.
  3. Expand your filter to browse source members. 

Creating New Source Members 

  1. Navigate to the source file. 

  1. Click “+” to create a member (e.g., MYPROGRAM.RPGLE). 

  1. Edit using features like autocomplete. 

  1. Save with Ctrl + S. 

  1. Right-click > Run Action > Choose appropriate compile option (e.g., Create SQL ILE RPG Program). 

Note: Remote compile options are defined via .vscode/tasks.json or custom commands in the extension settings. 

File Comparison 

To compare IFS files or downloaded members: 1. Right-click a file > Compare. 2. Right-click another file > Compare Selected. 

File comparison works best with IFS or downloaded source members.  

Go to File 

Quickly open any file with: - Ctrl + P (Windows/Linux) or Cmd + P (Mac) 

 

Integrated File System (IFS) Browser 

VS Code provides a graphical file explorer for IBM i’s IFS: - Navigate folders visually. - Right-click files to rename, refresh, or manage shortcuts. 

 

Debugging Support 

VS Code offers limited debugging for IBM i applications: - Debugging is supported for open-source environments or programs compiled with debug views. - STRDBG remains the primary tool for full-system interactive debug. - Use ACS or RDi in parallel if advanced breakpoints, watchpoints, or performance tuning are required. 

Note: Native VS Code debug support may rely on IBMi OSS tooling or additional backend services. 

 

Enterprise Development Workflow with VS Code 

Multi-Developer Environments 

  • Each developer can use personalized .vscode/settings.json for local preferences. 

  • Shared settings and actions can be versioned in Git repositories. 

Code Promotion and CI/CD 

  • Promote code using Git workflows, tagging, and release pipelines. 

  • Integrate with Jenkins, GitHub Actions, or custom deployment scripts. 

  • Ensure QA/Prod partitions are accessed via limited profiles with appropriate governance. 

Version Control and Governance 

  • VS Code integrates with Git for version tracking, branches, and pull requests. 

  • Enforce code reviews and approvals through platform-based policies. 

 

Architectural Considerations and Trade-offs 

  • VS Code is not a full RDi replacement. While it enables modern UI and extension support, impact analysis and service entry point debugging may require additional tools. 

  • Ideal for agile, DevOps-ready teams adopting microservices or service modularization. 

  • Low overhead makes it suitable for cloud-based workspaces or remote development. 

 

Security and Best Practices 

  • SSH-based connectivity: Secure by default. 

  • Key-based authentication: Recommended over passwords. 

  • Authority Scoping: Ensure developers only access dev libraries. 

  • Audit Trails: Git + commit messages help with traceability. 

 

Conclusion 

VS Code brings a powerful, modern IDE experience to the IBM i ecosystem. From flexible debugging and seamless SSH connectivity to Git integration and object browsing, it offers a compelling upgrade over traditional green-screen tools. 

For architects and senior developers, it’s more than an editor—it’s a step toward agile, enterprise-grade development. By understanding its strengths, limitations, and best-fit scenarios, organizations can empower teams to write better code, collaborate more effectively, and modernize legacy workflows. 

Ready to elevate your IBM i development experience? Start with VS Code today. 

0 comments
5 views

Permalink