Serenji Release Notes - 3.2

Serenji Release Notes

Version 3.2
September 2021

Serenji 3.2 focuses on the debug experience and introduces zero configuration for users. No matter where you are or what you're doing, Serenji is always ready to go in just one click so you don't lose focus by spending time setting up a launch configuration. 

This enhanced debugger also takes advantage of the latest features of VS Code itself. With this powerful combination you'll be able to smoothly identify and quickly fix errors in your code, contributing to the production of quality, maintainable code. 

We have made it easy for new and returning users to start debugging with Serenji by adding: 

In this latest release you will experience: 

We have also made a number minor enhancements and bugfixes listed here

Serenji is available through the Extensions view (Ctrl/⌘+Shift+X) in VS Code or by downloading it from the VS Code Marketplace

For help or queries you can reach us at support@georgejames.com.

Walkthrough on Welcome page

To assist in getting you set up with Serenji, the walkthrough on the Welcome page will take you through: 

  • Installing the server components.
  • Selecting a server namespace.
  • Saving and then extending your workspace.
  • Requesting a debug license.

If you don't see the walkthrough on your landing page, run 'Welcome: Open Walkthrough...' from Command Palette (Ctrl/⌘+Shift+P) and select 'Serenji: Getting Started'. 



- walkthrough on Welcome page

Guidance on empty Explorer view

When you first open VS Code to an empty Explorer view, to use Serenji you just need to select 'Open Serenji Folder', enabling you to connect to an InterSystems Server.  

If you want to reopen a workspace you've already saved, you can do that also in the Explorer view. 



- prompts on empty Explorer view

Explorer context menu 

When you have a workspace open it's now easier to start editing and debugging from the Explorer menu - just right-click on a workspace to find 'Add Serenji Folder to Workspace' in the context menu. 



- right-click on a workspace to Add Serenji Folder to Workspace

Assistance in an empty Run and Debug view

The Run and Debug view now contains helptext and a number of commands for new and returning users to help get you started. There is also the ability to request a debug license, if you don't already have one. 

Run and Debug prompt- Run and Debug view

Zero configuration debugging

The process to start debugging is simple and straight-forward, just select the code to debug and press F5. 

If your workspace root folder already contains a launch.json file in the .vscode folder that a previous version of Serenji created, you will be prompted to delete it in order to enable this new feature on your first run.



- press F5 while focused in the code you want to debug

Navigate directly to the source of an error

Our gj :: locate technology enables you to navigate directly to the source of an error. Click on the gj :: locate panel on the status bar then enter the ObjectScript error message or line reference from a class/.mac routine. gj :: locate will then take you directly to the corresponding line in your source code. 



- click gj :: locate in the status bar

Intuitive prompts for entrypoint and arguments

When debugging, Serenji will now predict your entrypoint for a class method, procedure, subroutine or extrinsic function, as well as providing a list of previous argument lists to help reduce typing. 



- entry point predictions when starting to debug

Configurable break on error

Routines will pause when an error is caught by Try/Catch, $ETRAP or $ZTRAP.

You can control which errors trigger this behaviour by using the edit pencil that appears when you hover over 'Caught Errors'. 

To disable this you can clear the 'Caught Errors' checkbox in the BREAKPOINTS pane. 



- error being caught during debugging

Program output in debug console

Output sent by your code now appears in the debug console when using the WRITE command.

The output is colour coded as follows: 
Yellow text - debugger session information.
Blue text - output from the WRITE command.
Numeric badge - indicates two identical consecutive lines of output from the process being debugged. 
Red text - shows an untrapped error in the code. 

If you prefer not to have identical lines collapsed you can set "debug.console.collapseIdenticalLines": false



- example of output from WRITE command

Serenji commands on Server Manager’s namespaces tree

If you have the InterSystems Server Manager extension installed, you can launch Serenji debug sessions in a namespace through the debug icon. You can also open a Serenji folder onto that namespace for editing through the context menu. 

Serenji debug launch in Server Manager- button to launch a Serenji debug session in a namespace
Serenji debug context menu Server Manager
- context menu item to start editing there

Run code without debugging

To execute code without stepping through, focus on the section you want to run and press Ctrl+F5. 



- press Ctrl+F5 to run code

Run and Debug CodeLenses 

We have placed CodeLenses, which are actionable links, above each classmethod or callable routine entry point allowing you to easily run or debug code. 

These can be hidden per file type under settings with "serenji.codeLenses.debug.cls": false



- display CodeLenses for Serenji

Multiple concurrent debug session and consoles

Dynamic configuration has been used to leverage VS Code's support for multiple concurrent debug sessions and consoles. This is particularly useful when the processes relate or are dependent on each other. 

This can be enabled by launching another debug session (F5) while the first one is still active. 



- debugging two class methods concurrently

Shaded background for read-only documents

The VS Code customize color feature within Serenji enables you to set different background colours for read-only documents that are not being debugged, to differentiate between the two. You can customize the colour using serenji.readonly.background

Background for Read-Only
- code opened from a serenji-readonly folder has a shaded background

Other updates

We've also included the following minor enhancements and bugfixes:

  • Make the ‘Pause’ button work.
  • Return focus to class or MAC document after debugging through its INT code.
  • Pre-fill namespace selector where possible when launching debugging.
  • Include in namespace selector any namespaces that use remote databases.
  • Use server’s connectTimeout setting during debug connect.
  • Add command for requesting a debug license.
  • Improve messages when debug license is needed.
  • Make ‘never’ option on debug license dialog work properly.
  • Fix double-encoded debug license request email link bug.
  • Contribute commands to Remote Indicator (left end of status bar).
  • Coexist better with other ObjectScript extensions.
  • Add new folder to end of workspace rather than start, to improve reliability.
  • Improve how filepaths are displayed.
  • Respect other server-side source control classes as well as Deltanji’s.
  • Fix error that reported an undefined ‘folders’ variable.
  • Fix race condition that in rare circumstances caused an ECONNREFUSED error.
  • Add dataTimeout setting with a default of 20 seconds to better handle slow networks.
  • Add option to ignore warning about mismatch between client and server versions.
  • Update dependent packages.
  • Embedded Deltanji Solo changes:
    • Fix full-type Change Request diff in Beyond Compare fetching wrong versions for Previous folder.
    • Correct searching for all-numeric Change Requests. 
    • Support simplified Locations & Routes diagrams. 

For help or queries related to Serenji version 3.2 you can contact us at support@georgejames.com