Setting Up VS Code for RPG and Valence Development

If you still live in SEU, PDM, WDSC, RDi, or what-have-you, and you’re ready to take the leap into Visual Studio Code, then this post is for you. Combined with the IBM i Development Pack extensions, you can use VS Code to quickly and intuitively edit, compile and browse IBM i source members and IFS files, along with many other nifty developer functions. Add in the Valence extension from CNX and you can also peruse Nitro App Builder (NAB) apps, leverage the Valence Assistant for coding, convert green screen applications to NAB, run regression tests and more — all within the VS Code ecosystem.

So this month’s tip covers three VS Code setup topics to get you going:

  1. Download and install VS Code (if you haven’t already)
  2. Install the IBM i Development pack
  3. Install and connect the Valence plug-in

Part 1 — Download and install Visual Studio Code

VS Code is free and runs on Windows, macOS and Linux. The official download page is https://code.visualstudio.com/download.

Windows:

  1. On the download page, choose the User Installer for your architecture (x64 for most PCs). User Installer does not need admin rights and updates more smoothly.
  2. Run the downloaded VSCodeUserSetup-….exe file.
  3. Accept the license, keep the default location, and on the Select Additional Tasks screen leave these checked if they appear:
    • Add “Open with Code” to file and directory context menus
    • Add to PATH
  4. Finish the installer and launch VS Code.

Mac:

  1. Download the .dmg that matches your Mac (Apple silicon or Intel; Universal is fine).
  2. Open the disk image and drag Visual Studio Code into Applications.
  3. Launch VS Code from Applications (right-click → Open the first time if Gatekeeper asks).

Part 2 — Install Code for IBM i

Though you can install the Code for IBM i extension alone, for typical IBM i development work we suggest you install the full IBM i Development Pack. This is the curated bundle the Code for IBM i project recommends and includes all the language tools you will likely ever need on the system.

Steps to install from inside VS Code:

  1. Open VS Code.
  2. Open Extensions:
    • Windows / Linux: Ctrl+Shift+X
    • macOS: Cmd+Shift+X
  3. Search for IBM i Development Pack (publisher is Code4i).
  4. Click Install. VS Code will then pull in the pack and its member extensions.
  5. When it finishes, look at the Activity Bar on the far left. You should see an IBM i icon. If it does not appear, reload the window: Command Palette (Ctrl+Shift+P / Cmd+Shift+P) → Developer: Reload Window.

What the Development Pack gives you…

The pack is the quickest, easiest path to a highly usable RPG development setup in VS Code. It currently includes:

  • Code for IBM i – SSH connection, source/object browsers, compile actions, IFS, terminals
  • IBM i Languages – Syntax highlighting for RPG, RPGLE, CL, DDS, etc.
  • RPGLE – Content assist, outline, hover, and a configurable free-format linter
  • CL / COBOL – Language support if you should ever need to edit
  • Db2 for IBM i – Run SQL statements and keep a reusable history of those queries
  • IBM i Project Explorer – Local, buildable project layout and library list
  • IBM i FileSystem – Richer QSYS object views (OUTQs, DTAQs, SAVFs, etc.)
  • Other Pack Tools – IBM i Testing, IBM i Renderer, RPGIV2FREE, CL Prompter, Walkthroughs, and Error Lens. These tools provide testing, visualization, fixed-to-free conversion, CL prompting, guided walkthroughs, inline error highlights and more.

Connecting Code for IBM i to your partition:

  1. Click the IBM i icon that now appears in the Activity Bar on the left.
  2. Choose Connect to an IBM i or click + to add a connection.
  3. Fill in at least:
    • Connection name (something you will recognize, e.g. Acme Dev Box)
    • Host name or IP
    • SSH port (usually 22)
    • IBM i user profile
    • Password, or an SSH private key if that is how you sign on
  4. Save, then connect.
  5. After a successful connect you should see servers, a library list, and object/source browsers. Open a member (RPGLE, SQLRPGLE, CLLE) and confirm highlighting and outline view work.

If the connect attempt fails, the most common causes are IBM i and/or network related, such as SSH not being started (STRTCPSVR *SSHD), the profile disabled, port 22 blocked, or a password/key mismatch.

 

Some other extensions worth installing later…

  • IBM i Debug (publisher IBM) is the official debugger for RPG and COBOL in VS Code. It is not part of the community Development Pack above. Install it when you want breakpoints, step-over/step-into, and variable inspection in the normal VS Code debug UI. It depends on the IBM i Debug Service, current PTFs, and certificates configured in Navigator for i, so treat this installation and setup as a follow-on project, as it’s not a requirement for everyday editing and compiling.
  • GitLens (publisher GitKraken) is worth adding if you keep source under Git (local workspace, IFS repo, or a clone you sync with IBM i). It layers commit history, blame annotations, and file/line history on top of VS Code’s built-in Git support, which is helpful when several developers share RPG, CL, or DDS members and you need to see who changed what without leaving the editor. This is not IBM i–specific, but it pairs well with Code for IBM i once your source is in a Git workflow.

Part 3 — Install the Valence extension

The Valence extension provides a full gammit of Nitro App Builder-related functions. Some typical uses include:

  • Find which NAB apps call which RPG programs without leaving the editor.
  • Open IBM i source in Code for IBM i and @-reference it in Valence Assistant.
  • Plan or adjust a NAB app from a plain-language description, then review before anything is generated.
  • Convert a DSPF + RPG green-screen program to a NAB web app (beta), keeping master-detail flow and business logic.
  • Generate themed technical documentation from source and export PDF.
  • Batch apps into regression suites and compare behavior across environments.

Install the Valence extension:

  1. In VS Code, open Extensions again (Ctrl+Shift+X / Cmd+Shift+X).
  2. Search for Valence (specifically, Valence — IBM i Modernization & AI). Confirm the publisher is CNX Corporation.
  3. Click Install.
  4. A V icon appears in the Activity Bar. If it does not, reload the window.

Connect the Valence extension to your Valence instance(s):

  1. Click the V icon to open the Valence sidebar.
  2. Click + Add.
  3. Enter:
    • A connection name for the instance (e.g., Valence Dev)
    • The Valence server URL (whatever you use to access the instance in your browser, including port number)
    • Your Valence user ID (in most cases, same as your IBM i user ID)
  4. Click Connect and enter your password.
  5. After connect, NAB applications, widgets, data sources, variables, listeners, and RPG calls for the instance will show in a tree. Click the Chat icon to open the Valence Assistant.

Though the Valence extension works with up-to-date Valence 6.3 instances, for best results we recommend you connect to instances that have been updated to the latest Valence 6.4 build. AI Chat, creating new apps from a prompted description, updating live NAB apps from chat, converting green screen applications to NAB, and regression testing require Valence 6.4.20260630 or higher and Valence Assistant enabled on the instance.


Your completed VS Code installation with the IBM i Developer Pack and Valence extensions will look something like this…

With this stack installed on your laptop or PC, you are not choosing between “RPG development” and “web/modernization” tools. Rather, you are editing source, compiling programs, and working with Valence NAB apps all from the convenience of a single editor. Pretty slick!

For some excellent IBM i-centric VS Code how-to videos, be sure to check out the resources at the Seiden Group. Also make plans to tune into the Developer Diaries session on September 2 for some hands-on demonstrations of the Valence extension in action.