Question GUSTAVO MARQUES · Jan 22, 2022

How to set up VSCode terminal for IRIS terminal?

Hi there,

Please, could anyone tell me how can I set up VSCode terminal to IRIS terminal? I already saw this working in a video with docker version from IRIS Community. I have the Intersystems Extension Pack and IRIS Community locally installed.

Thanks

Product version: IRIS 2021.1
$ZV: 2021.1 (Build 215.3U)

Comments

Dmitry Maslennikov  Jan 22, 2022 to GUSTAVO MARQUES

I don't use Windows, but can say how it supposed to be

VSCode supports PowerShell terminal or cmd.exe, in case if you use wsl2, it can bee configured to open it as well.

But, there is a way, to open the terminal just in cmd.exe or from PowerShell, first you have to figure it out how to get it from there. iris.exe should have options, to run it inside the current terminal, I don't know if Windows version already has irissession, you could try it.

0
Muhammad Waseem · Jan 22, 2022

Hi,

If you are looking to connect to IRIS terminal from VS Code then first of all make sure docker container is running and then follow below steps:

- From Menu select Terminal > New Terminal
-Then  Run this command to connect to IRIS terminal
docker-compose exec iris iris session iris

Thanks
 

0
GUSTAVO MARQUES  Jan 22, 2022 to Muhammad Waseem

Is not it possible to connect using a local installation?

Thanks

0
Muhammad Waseem  Jan 22, 2022 to GUSTAVO MARQUES

from local installation, follow below steps
- From Menu select Terminal > New Terminal
- Run irissession from installation directory (In my case its C:\InterSystems\IRISHealth\bin\) with instance name ("C:\InterSystems\IRISHealth\bin\irissession <instance name> ")
e.g C:\InterSystems\IRISHealth\bin\irissession irishealth 
Thanks

0
Robert Barbiaux · Jan 23, 2022

To get an IRIS session integrated in VSCode terminal, you can add it to settings.json :

  "terminal.integrated.profiles.windows": {
        "IRIS Terminal": {
            "path": [
                "C:\\InterSystems\\IRISHealth\\bin\\irissession.exe"
            ],
            "args": ["<instance name>"],
            "icon": "terminal-cmd"
        }
    }

However, this terminal window will lack the niceties of the ISC Terminal application, such as command history.

0
Michael Davidovich  Mar 15, 2022 to Robert Barbiaux

Does 'irissession' take any additional args like username and password?

0
Jeffrey Drumm · Jan 25, 2022

For those that use a Windows workstation but code on a Linux/Unix-based server, here's a configuration that provides a remote IRIS terminal session. It uses the ssh client that is included with Windows 10 (I'm assuming there's one in Windows 11 as well).

Add it to your user settings to make it available across all of your projects, or to your workspace settings to have a custom terminal session per workspace:

    "terminal.integrated.profiles.windows": {
        "IRIS Session": {
            "overrideName": true,
            "path": "C:\\Windows\\System32\\OpenSSH\\ssh.exe",
            "args": [
                "-t",
                "<user>@<hostname>",
                "iris session <instance>"
            ]
        }
    }
0
Jeffrey Drumm  Jan 27, 2022 to Jeffrey Drumm

One oddity I've noticed when using this method is that the Home/End keys don't work as expected.

If I start an ssh shell session and manually run iris session <instance>, everything works normally.

If I start it using the method described in my post above, the Home and End keys seem to send a newline or carriage return, sending what I've typed to the IRIS interpreter rather than moving the cursor to the beginning of the line. This is regardless of whether I execute it from VS Code or the "DOS" Shell, so it's not really a VS Code problem. Just curious if anyone else has a solution ...

Note: Interestingly Ctrl+A works for moving to the beginning of the line ... but not Home.

0
Gautam Rishi · Jun 8, 2023

How can i exit once it is started in namespace. Any keyboard shortcut.

0
Chris Stewart  Jun 9, 2023 to Gautam Rishi

HALT will exit any running IRIS Terminal session (though I tend to use H instead as HALT can also stop a Linux machine if you have already exited the IRIS Terminal)

0