Introduction to Studio
InterSystems® Studio has been deprecatedOpens in a new tab. Beginning with version 2024.2, it is no longer included with installations of InterSystems IRIS®, and it is no longer receiving maintenance updates. An upgrade to InterSystems IRIS 2024.2 or later will remove any Studio installation which is associated with the instance.
The version of InterSystems Studio which was included with InterSystems IRIS 2024.1 is available as a stand-alone component from the WRC Downloads page (https://wrc.intersystems.com/wrc/coDistGen.cspOpens in a new tab). To show only the Studio downloads, type studio in the Name column. Neither upgrades nor new installations of InterSystems IRIS will affect a stand-alone Studio installation.
InterSystems provides the following documentation about Studio 2024.1 for legacy support only. InterSystems recommends that all users develop ObjectScript code using the InterSystems ObjectScript Extension Pack for Visual Studio Code. See Migrate from Studio.
InterSystems Studio, a client application running on Windows systems, is an IDE for developing ObjectScript code on an InterSystems IRIS instance.
Studio offers features that help you develop applications rapidly, in a single, integrated environment including:
-
An editor in which to create classes and routines.
-
Integrated syntax coloring and syntax checking for ObjectScript, Java, SQL, JavaScript, HTML, and XML.
-
Support for teams of developers working with a common repository of application source code.
-
A graphical source code debugger.
-
The ability to organize application source code into projects.
Studio is a client application that runs on Windows-based operating systems. It can connect to any InterSystems server regardless of what platform and operating system that server is using, and supports SSL/TLS-protected connectionsOpens in a new tab.
Enabling Studio Connections
For Studio for connect to an InterSystems IRIS server, that server needs to be in the connection list of the InterSystems IRIS Server ManagerOpens in a new tab.
The user credentials that you use to authenticate to the InterSystems IRIS server must also have adequate privileges to resources on that server, as described in Security.
You must also ensure that the InterSystems IRIS server’s web server parameters are configured correctly. See Advanced Web Server ConfigurationOpens in a new tab and review the settings for WebServerNameOpens in a new tab, WebServerPortOpens in a new tab, and WebServerURLPrefixOpens in a new tab for the server you want to connect to. Also make sure that the %Service_Bindings serviceOpens in a new tab is enabled.
Enabling Studio to Use Non-Latin1 Encoding
Because Studio uses non-Unicode encoding, in order to handle non-Latin1 character encoding, used for languages such as Russian, language encoding must be configured at the Windows OS level. Consult the Windows OS documentation for more information.
Overview of the Studio Window
The main components of the Studio user interface are shown below:
-
Editor window: Class Editor for editing class definitions, Routine Editor for editing routines and include files, and CSP Editor for editing CSP definition text. Using CSP files with InterSystems IRIS® is not recommended.
-
Class Browser window: for viewing existing classes.
-
Workspace window: three tabs let you display the contents of the current project, all open windows, or the content of the current namespace.
-
Class Inspector window: for viewing and modifying keywords in a class definition.
-
Watch window: displays variables.
-
Title Bar: displays ConnectionName/Namespace@UserName - ProjectName.prj – Studio – ActiveDocument. If the active document is maximized, the name shows in square brackets.
In addition to the windows displayed above, Studio contains wizards and templates for assisting with common tasks. These include:
-
Find in Files window: displays a search window.
-
Output window: displays output from the InterSystems server (such as messages generated during class compilation).
-
Code Snippets window: for viewing and dragging user-created code snippets.
-
New Class wizard: defines a new class.
-
Class member wizards that add members to class definitions for: properties, indexes, relationships, methods, parameters, SQL triggers, queries, projections, storage, foreign keys, and XData blocks.
-
Wizards that create classes from other technologies; from: Java classes and jar files, SML schema, SOAP client classes, that provide access to COM objects, and DLL assembly files from .NET.
-
HTML templates that add: colors, tables, tags, and scripts.
-
CSP Form wizard: creates an HTML form bound to an object in a CSP page. Using CSP files with InterSystems IRIS is not recommended.
Studio is not a Unicode application, because it is built with controls that do not support Unicode. In particular, the Find in Files window does not support Unicode.
Visibility of Code
The Namespace tab of the Workspace window displays the code in the current namespaceOpens in a new tab, with the following exceptions:
-
If you are in the %SYS namespace, all classes and routines are displayed, including classes and routines with names that start with %.
-
If you are in any other namespace, all classes and routines available in that namespace are visible by default, except for classes and routines with names that start with %. To display such classes and routines, select the Show System check box in the Open dialog box (File > Open).
Projects
Studio uses projects to organize application source code.
A project is a set of class definitions, routines, and include files. For example, you might create a Studio project to group all classes for a single application.
You are always in a project, either one that you created or the default project that is created when you first open Studio. The default project is called Default_yourusername (a prefix of Default_ followed by your username).
All files in a single project must be in the same namespace (and on the same InterSystems server). Each class or routine can be associated with any number of projects. Each namespace can contain any number of projects.
The project stores information such as the class hierarchy in a given InterSystems namespace, used when you edit classes. The project also stores debugging information (such as how to start the application you want to debug).
Class Definitions
A class definition defines a class. A class definition consists of class members (such as properties and methods) and other items, called keywords, each with associated values, that specify details of the class behavior.
Class definitions reside in a database where they are stored in the class dictionary. A class definition can be compiled, a process which creates executable code that can create object instances based on the class definition. The source code for the executable code created for a class consists of one or more routines. These generated routines can also be viewed in Studio.
A class definition can be projected for use by other technologies. In the case of SQL, this projection is automatic. In the case of Java, there is an additional compilation step in which a Java class is generated that corresponds to the class definition. For details, see Adding Class Projections.
Within Studio, class definitions can be displayed and edited in a Class Editor window. Class definitions can also be viewed in the Class Inspector window as keywords and their corresponding values in tables.
CSP Files (Legacy)
Legacy applications may also include CSP files, which are used in tag-based development. In the tag-based development model, the developer creates .csp files contained within the directory structure accessed by the web application. The files contain a mix of HTML and specialized tags that provide for communication with the server. The CSP compiler reads the files and generate class definitions from them, and the class definitions generate the actual runtime HTML. For information on tag-based development, consult Tag-based Development with CSPOpens in a new tab in the Caché/Ensemble documentation.
Using CSP files (tag-based development) with InterSystems IRIS is not recommended. You can instead create CSP classes; see Using CSPOpens in a new tab.
Routine Editor
Using the Routine Editor, you can directly create and edit the source for specific routines in a syntax-coloring editor. You also use the Routine Editor to edit include files.
Multiple User Support
Studio is an object-based, client-server application. The source files — class definitions, routines, and include files — that you can create and edit with Studio are stored in an InterSystems server and are represented as objects.
When you save a source file from Studio, it is saved in the InterSystems server you are connected to. If a source file is modified on the server while you are viewing it in Studio, you are notified and asked if you want to load the newer version.
Studio automatically detects when multiple users view the same source components simultaneously and manages access concurrency. If you attempt to open a file that is being edited by another user, you are notified and asked if you want to open the file in read-only mode.
Importing and Exporting Documents Locally
Normally any documents you work with in Studio (such as class definitions or routines) are stored in an InterSystems database (which may be on a remote machine). You can import from and export to local files using Tools > Export and Tools > Import.
Class definitions and routines are stored in local files as XML documents.
Debugging
Studio includes a source-level, GUI debugger. The debugger attaches (or starts up and attaches to) a target process running on the same InterSystems server that Studio is connected to. The debugger controls this target process remotely and allows you to watch variables, step through code, and set breakpoints.
You typically must have a project open in order to use the debugger; the project contains the information needed to start the debug target (name of a routine, method, or client application). In addition, the project stores a list of breakpoints that were set in a prior debugging session.
You can attach and break into a running process without having a project open. In this case Studio does not remember breakpoint settings from previous sessions. See more about debugging in Using the Studio Debugger.
Debugging Object-Based Applications
At this time, Studio only allows source-level debugging of INT (ObjectScript routine). To step through, or set breakpoints within classes, open the corresponding INT and use the debugging commands in it.
To make sure that the generated source code for a class is available:
-
Select Tools > Options.
-
Navigate to Compiler > Flags & Optimization in the left-hand pane.
-
Select the Keep generated source code check box.
Security
InterSystems security features control the use of Studio, the ability of Studio to connect to any InterSystems server, and support for SSL/TLS-protected connectionsOpens in a new tab. When you start Studio, it presents a login screen; to use Studio, you must log in as a user who holds the following privileges:
-
%Development:Use - Use permission on the %DevelopmentOpens in a new tab resource grants access to various development-related resources.
-
%Service_Object:Use - Use permission on the %Service_Object resource grants access to the %Service_BindingsOpens in a new tab service, which controls access to Studio.
-
Read permission for the default globals database of the namespace which you want to connect to (in other words, %DB_<database-name>:Read).
-
Read permission for the database which stores any code which you want to open (in other words, %DB_<database-name>:Read or %DB_<database-name>:Write).
-
Write permission for the database which stores any code which you want to save or compile (in other words, %DB_<database-name>:Write).
To attach to a process using the Studio Debugger, the user must also have the Use privilege for the %System_Attach resource.
The way in which a user is granted these various privileges depends on the instance’s initial security level, as described in the following list. (Note that Studio access may also be affected by any changes to default settings that have occurred since installation.)
-
For an instance with minimal security, all users, including UnknownUser, have all privileges and access to all namespaces. When presented with the Studio login screen, either leave the Username and Password fields blank or enter _SYSTEM and SYS as the username-password pair.
-
For an instance with normal security, you must be explicitly granted the specified privileges. This is established by being assigned to a role or roles that holds these privileges.
-
For an instance with locked-down security, the service that governs access to Studio (%Service_Bindings) is disabled by default. By default, no user has access to Studio.
To change Studio authentication settings for %Service_Bindings:
-
Open the Management Portal for the instance to which you’d like to connect.
-
Select System Administration > Security > Services.
-
Select Go in the View or edit service definitions section.
-
Select %Service_Bindings.
-
Select or clear the check boxes under Allowed Authentication Methods.
Source Control Hooks
Studio includes a mechanism for implementing custom hooks — code that is executed on the InterSystems server whenever a document is loaded or saved. Typically these hooks are used to implement a connection to a source or revision control system. Refer to Integrating InterSystems IRIS with Source Control SystemsOpens in a new tab for more details.
Running Studio from the Command Line
You can run Studio from the system's command line using the command Cstudio.exe (in the install-dir\bin directory). The command and its parameters are case-sensitive.
Parameter | Description |
---|---|
? | Help info |
/Servername=ServerName | Connect to the server named ServerName. |
/Server=cn_iptcp:127.0.0.1[51773]:: | Connect to the server at ip address[port]. |
/Namespace=User | Connect to the User namespace. You must also define a server. |
/Project=MyProject | Open project MyProject. You must also define a server and a namespace. |
cn_iptcp://127.0.0.1:51773/User/test.int | Load routine test.int. cn_iptcp is a case sensitive protocol identifier. |
/files="tag+1^myroutine.int",User.Class1.cls | Open listed documents and set cursor in specified position. You must also define a server and a namespace. |
/pid=123 | Attach to process. You must also define a server and a namespace. |
/fastconnect=127.0.0.1[51773]:USER:_SYSTEM:SYS | Connect without connection definition in registry using ip address[port]:USER:username:password |