Encontrar

Artículo
· 1 dic, 2025 Lectura de 5 min

Debugging 101: Your First Breakpoint and Tracing Variables in VS Code

In this article, we will discuss all the debugging tools included in the Microsoft Visual Studio Code IDE.

What will be covered:

  • Breakpoints
  • Watch window
  • Call Stack

Let's start by learning about debugging requirements!

Prerequisites

There are two plugins (extensions) for debugging ObjectScript:

The first is part of the InterSystems ObjectScript Extension Pack. The second is Serenji, a standalone plugin that provides an editor, file manager, and debugging functionality. Both plugins can be installed from the plugin store. To activate key functionality, Serenji requires a license. For this article, we'll use the InterSystems ObjectScript Extension Pack to reduce the learning curve. After you've mastered the basics, you can consider purchasing a paid license for Serenji.

You need: 

  1. The latest version of Microsoft Visual Studio Code IDE 
  2. Installed InterSystems ObjectScript Extension Pack plugin (after installing Visual Studio Code)
  3. InterSystems IRIS instance. You can choose between Docker version or installation kit. (you have to be registered within Developer Community ecosystem)

How to connect your IRIS to Microsoft Visual Studio Code IDE you can read here.


Setting up the debug function


Typically, the configuration file is generated automatically after debugging begins. It will look like this:
 

{
    "configurations": [
       
    {
        "type": "objectscript",
        "request": "launch",
        "name": "ObjectScript Run current routine",
        "program": "${file}"
    }
    ]
 
}

 

Where type is the language of the code being debugged, request is the debugging start option (launch - starts and executes the code or attach - attaches to the already running code), name is the debugging identifier, program is the name of the class and method being debugged (in this configuration, an open file is picked up). 

Breakpoint

Any program code is executed from top to bottom, line by line. When debugging, it's important to understand the program's state at any given moment, including the values ​​of local and global variables, the opening and closing of files, web connections, and so on.

Breakpoint is a debugging tool that allows you to pause program execution at a specific line to pinpoint unwanted changes in the program's state. Getting started with debugging in Visual Studio Code is very simple. Let's say we have the following code:
 

Class Test.MyFile Extends %RegisteredObject
{

ClassMethod TestVar() As %Integer
{
    set randomNum = $RANDOM(10)
    return randomNum
}

ClassMethod MyMethod() As %Integer
{
    set randomNum = ..TestVar()
    set numVar = 2
    set numDivision = randomNum / numVar

    return numDivision
}
}

We need to understand the value stored in the x variable in the MyMethod() method. It is returned by the TestVar() method. We set a breakpoint before performing the arithmetic operation with this variable on line 15 and click the Debug button. If you don't set a breakpoint, debugging will simply execute the code without outputting anything to the console.

We can see the value of a given variable immediately after starting debugging! Very convenient. Next, we can step through the entire program line by line by pressing the Step into button or F11.

 

Great! Now we know the values ​​of the variables at every step of the code execution.

We can loop through variables within a loop in the same way. Let's take the following code:
 

Class Test.MyFile Extends %RegisteredObject
{

ClassMethod LoopMethod() As %List
{

    set objList = $LB("string", 1, {"name":1})
    for i=1:1:$LL(objList){
        set item = $LG(objList, i)
    }
    
    return objList
}

}

Let's set a breakpoint at the beginning of the method and start debugging. Then, using the “Step into” button on the debugging panel placed at the top of IDE, we move down the program and observe the values ​​assigned to the item variable. We also see the values ​​of all other variables within the program, including the iterator variable i, which in this case is equal to 2.

 
So, moving further along the loop, you can track what value will be assigned to the item variable for each step of the loop.

Watch window

We can also monitor a variable's state during debugging by adding it to watch. In watch mode, we can apply methods to a variable and measure its state in each iteration. For example, consider the following code:
 

Class Test.MyFile Extends %RegisteredObject
{

ClassMethod WatchAVariable() As %List
{
    set list = ""
    set randomNum = $RANDOM(100)
    for int=randomNum:randomNum:100000{
        set list = list _$LB(int)
    }

    return list
}
}

And we will write three methods for the list variable:

 
We want to keep track of the length of the list $LL(list), the last number added $LG(list, -1) and its square root $LG(list, -1) ** 0.5. We step inside the loop and get the first values:

 
By defining functions in the watch window, we can see detailed debugging information! Additionally, the variables window still displays the values ​​of the int iterator variables and the loop step. Very convenient!

Call stack window

Notice the “Call Stack” window at the very bottom. This window shows the order of function calls in your code. In our current state, we have two items: the loop and the assignment of variables WatchVariable+7 and WatchVariable+6, respectively. But everything here is pretty self-explanatory. Let's add some more logic:
 

Class Test.MyFile Extends %RegisteredObject
{

ClassMethod RandomlyChangeVar() As %Integer
{
    return $RANDOM(100)
}

ClassMethod WatchAVariable() As %List
{

    set list = ""
    set randomNum = $RANDOM(100)
    for int=randomNum:randomNum:100000{
        set list = list _$LB(int)
        if $LG(list, -1) ** 0.5 > 10{
            set int = int + ..RandomlyChangeVar()
        }
    }
    return list
}


}  


We've added a new method, RandomlyChangeVar(), which will change the next int variable if the square root of the last number is greater than 10. We loop until the state of the variables satisfies the logical condition:

 

Note the values ​​of the square root function and the order of function calls in the call stack. As soon as the square root exceeded 10, the RandomlyChangeVar() function was immediately called! Furthermore, by measuring the length of the list, we were able to track how many loop steps it took to reach the desired logical condition. This makes it easy to track the order and conditions of calling multiple functions, no matter how complex the logic.

That's it! You now mastered VSCode ObjectScript Debugging.

In this article, we took a detailed look at the debugging feature in VSCode. We set our first breakpoint, tracked variable values.

Comentarios (0)2
Inicie sesión o regístrese para continuar
InterSystems Official
· 1 dic, 2025

Release Notes: InterSystems Cloud Services – Version 25.24.2 Release Notes (November 2025)

Overview

This release introduces major improvements to storage scalability and performance, a significant operating system upgrade across all offerings, and a new default version of the FHIR Server. Together, these updates enhance system reliability, flexibility, and security while ensuring long-term platform supportability.


New Features and Enhancements

 

Category

Feature / Improvement

Details

Storage Enhanced LVM Support (Striped or Linear) Added support for LVM configurations, allowing deployments with striped or linear volume layouts for improved performance and flexibility.
  Opt-In LVM Configuration Customers can now opt in to use LVM-based storage during provisioning, offering greater control over volume management and data layout.
  Expanded Maximum Storage Limit Maximum supported storage per deployment increased to 8 PB, supporting large-scale data workloads and long-term growth.
Operating System Red Hat Enterprise Linux 9.6 Upgrade All InterSystems Cloud offerings upgraded from RHEL 9.0 to RHEL 9.6, delivering better kernel performance, enhanced security, and extended lifecycle support.
FHIR Server Default Version 2025.11.0

FHIR Server 2025.11.0 is now the default for all new deployments, providing improvements in scalability, interoperability, and data management.

🔗 For details, please refer to the FHIR Server 2025.11.0 Release Notes.
 

 


Recommended Actions

  • None

Support

For more information or assistance with this release, please contact InterSystems Cloud Services Support via iService or through the Cloud Service Portal.

Comentarios (0)1
Inicie sesión o regístrese para continuar
InterSystems Official
· 1 dic, 2025

Release Notes: InterSystems Cloud Services – Version 25.20.2 Release Notes (October 2025)

Overview

Version 25.20.2 expands global availability, enhances Advanced Security flexibility, and widens Network Connect integrations. This release introduces support for additional regions, new application-aware security rules, and expanded connectivity options for critical InterSystems services.


New Features and Enhancements

Category

Feature / Improvement

Details

Advanced Security Support for Message Bank Rules Advanced Security can now apply policies and rules specifically targeting Message Bank, enabling finer-grained protection for message archival and analytics pipelines.
  Multi-Application Rule Support Rules can now be configured to apply to multiple applications simultaneously, reducing duplicated configuration and simplifying policy management.
Network Connect Support for TGW Peering Now supports Transit Gateway (TGW) peering, enabling scalable multi-region and multi-VPC connectivity with lower complexity and improved traffic control.
  Support for FHIR Server Native Network Connect integration for FHIR Server, improving routing management, network visibility, and integration workflows.
  Support for Data Studio (Supply Chain Module) Adds support for InterSystems Data Fabric Studio with the Supply Chain module, enabling seamless integration into customer network topologies.
Global Expansion New Region: ap-northeast-1 (Tokyo) InterSystems Cloud Services is now available in the Tokyo region, reducing latency and expanding availability across Japan and the broader APAC region.

Recommended Actions

  • Review existing Advanced Security rules and consolidate them where multi-application rules simplify configurations.
  • Evaluate TGW peering for multi-region or hub-and-spoke network designs.
  • Customers in Japan or APAC should consider migrating workloads to ap-northeast-1 for improved performance.

Support

For more information or assistance with this release, please contact InterSystems Cloud Services Support via iService or through the Cloud Service Portal.

Comentarios (0)1
Inicie sesión o regístrese para continuar
InterSystems Official
· 1 dic, 2025

Release Notes: InterSystems Cloud Services – Version 25.23.2 Release Notes (November 2025)

Overview

Version 25.23.2 delivers targeted improvements to the Advanced Security UI and further streamlines the upgrade and update workflows across InterSystems Cloud offerings. These changes focus on clarity, efficiency, and operational excellence.


New Features and Enhancements

Category Feature / Improvement Details
Advanced Security UI Enhancements for Application Visibility Updated interface provides clearer, more intuitive application mappings, improving understanding of security boundaries, associated policies, and protected resources.
Upgrade & Update Optimized Upgrade/Update Process Enhanced upgrade/update pipelines reduce execution time, minimizing maintenance windows and improving overall system availability during scheduled operations.

Recommended Actions

  • Review the updated Advanced Security UI to familiarize your team with the improved application representations.

Support

For more information or assistance with this release, please contact InterSystems Cloud Services Support via iService or through the Cloud Service Portal.

Comentarios (0)1
Inicie sesión o regístrese para continuar
InterSystems Official
· 1 dic, 2025

Release Notes: InterSystems Cloud Services – Version 25.24.1 (November 2025)

Overview

Version 25.24.1 delivers major enhancements to DNS capabilities, platform reliability, upgrade workflows, and developer experience. This release also includes key fixes and increases in platform limits to better support modern workloads.


New Features and Enhancements

Category

Feature / Improvement

Details

Networking – DNS DNS Mapping (Static DNS Support) DNS support expanded from forwarding-only to full DNS Mapping, allowing creation and management of static DNS entries for improved service discovery and configuration flexibility.
Reliability & Resiliency Enhanced Self-Healing Checks Improved internal self-healing verification routines, enabling faster recovery and more precise detection of operational anomalies.
Advanced Security Improved Subnet Calculations Enhanced subnet validation and calculation logic, reducing configuration errors and ensuring consistent network segmentation across deployments.
Upgrade & Update Process HCC and IRIS Managed Services Improvements Streamlined and hardened upgrade/update workflows for Health Connect Cloud and IRIS Managed Services, improving reliability and automation accuracy.
DNS Fixes DNS Alias Bug Fix Fixed an issue where DNS aliasing failed to apply or propagate correctly in specific configurations.
Web Server Max Payload Increased to 200 MB Maximum allowed payload size increased from 10 MB to 200 MB, supporting larger uploads and more complex API interactions.
Developer Tools InterSystems Data Studio default version 1.1.1 New deployments now use InterSystems Data Studio with Supply Chain module 1.1.1 by default.
API Documentation Swagger Documentation for Metrics API Full Swagger/OpenAPI documentation now available for the Metrics API, improving clarity and developer experience for integrating monitoring data.

Recommended Actions

  • Review and, if desired, adopt DNS Mapping to simplify environment-specific hostname management.
  • Update automation scripts or clients to account for the increased Web Server payload size.
  • Consult the Metrics API Swagger documentation to enhance your monitoring integrations.

Support

For more information or assistance with this release, please contact InterSystems Cloud Services Support via iService or through the Cloud Service Portal.

Comentarios (0)1
Inicie sesión o regístrese para continuar