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)
Do you use Windows, macOS or linux?
Windows 10
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.
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
Is not it possible to connect using a local installation?
Thanks
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
To get an IRIS session integrated in VSCode terminal, you can add it to settings.json :
However, this terminal window will lack the niceties of the ISC Terminal application, such as command history.
Does 'irissession' take any additional args like username and password?
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:
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.
How can i exit once it is started in namespace. Any keyboard shortcut.
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)