A couple of updates on this technique:

  • You'll need the Dev Containers extension from Microsoft installed.
  • We can simplify the procedure by starting with the 'Dev Containers: Clone Repository in Container Volume...' command from Command Palette. This avoids needing a local clone of the repository in your Windows filesystem.

I have updated the original post.

It's worth noting that the extension can't currently run on Windows without crashing VS Code's extension host (EH) process and thus impacting all other extensions. More information here, which I hope qualifies my entry for the 'Find a bug in InterSystems IRIS External Languages Offerings' bonus.

For Windows users there's a workaround, as long as you have SSH access to a Linux host on which you can run Docker containers. Here's what to do:

  1. Launch VS Code on your Windows desktop.
  2. If you don't already have it, install the 'Remote - SSH' extension from Microsoft.
  3. From Command Palette run `Remote-SSH: Connect Current Window to Host...`.
  4. Enter your SSH connection string in the form `user@host`.
  5. When prompted for your password (top centre), enter it.
  6. Wait for the progress notifications (lower right) to complete and for the Remote panel on the status bar (far left) to confirm that you are connected.
  7. In Extensions view, find gj :: configExplorer and install it. This action will install it on the Linux server for use of the account you connected there with. It also installs Server Manager if necessary.

When operating this way gj :: configExplorer executes in an EH on your Linux server. Connections to the target servers' superserver ports will originate from there, not from your Windows device. Resolving the server names / addresses will behave accordingly.

I develop and publish VS Code extensions targeting users of the InterSystems platforms. Occasionally an extension needs some support classes installed on the servers it works with. I propose establishing a naming convention for these classes, as follows:

  1. First dot-piece of the package name should be vscode
  2. Second dot-piece should be derived from the "publisher" property in the extension's package.json manifest, as follows:
    • If publisher is "intersystems-community" then use dc
    • Otherwise use the publisher string, transformed if necessary to conform to package-naming constraints (e.g. remove punctuation). Uppercase characters in the publisher string may be retained or folded to lowercase at the choice of the publisher, but the transformation should be applied consistently for all classes published by that publisher. For example, if the extension uses publisher ID Acme-Nadir their class names might begin vscode.AcmeNadir. or vscode.acmeNadir. or vscode.acmenadir.
  3. Third dot-piece should be derived from the "name" property of the extension, using the same transform guidance as above.
  4. Additional dot-pieces of the package name can be added at the choice of the extension author.
  5. Classnames should follow the convention proposed by @Robert Barbiaux in this article, i.e. be upper camel case (aka Pascal case).

Excellent article @Timothy Leavitt 

I'd like to offer an example from the coalface today. An issue was affecting my improved Testing Manager extension for VS Code. Coverage information from the Test Coverage Tool package assumes that a method signature only occupies one line, but an option in the ObjectScript extension can instruct the server to generate the UDL representation with multi-argument signatures split across consecutive lines.

I was pretty sure the necessary information was available in SQL tables on the server. I just needed to come up with the right query. I consider myself novice grade on SQL, so was glad that Copilot could use the GPT-4.1 model to improve the initial query I'd drafted in the SQLTools extension.

I started with this:

SELECT Name as Method,
  $LENGTH(FormalSpec, ',') AS ArgumentCount,
  CASE
    WHEN $LENGTH(FormalSpec, ',') > 1 THEN $LENGTH(FormalSpec, ',')
    ELSE 0
  END AS AddsLines
FROM %Dictionary.MethodDefinition
WHERE parent = '%IPM.Repo.Definition'
ORDER BY SequenceNumber

Copilot got me very close, and a small tweak by me yielded this:

SELECT Name as Method,
  $LENGTH(FormalSpec, ',') AS ArgumentCount,
  CASE
    WHEN $LENGTH(FormalSpec, ',') > 1 THEN $LENGTH(FormalSpec, ',')
    ELSE 0
  END AS AddsLines,
  SUM(
    CASE
      WHEN $LENGTH(FormalSpec, ',') > 1 THEN $LENGTH(FormalSpec, ',')
      ELSE 0
    END
  ) OVER (
    ORDER BY SequenceNumber ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
  ) AS Offset
FROM %Dictionary.MethodDefinition
WHERE parent = '%IPM.Repo.Definition'
ORDER BY SequenceNumber