The official InterSystems VS Code extensions are packed with features that make developing with InterSystems products a breeze. Today I'd like to highlight some small but useful features that you may have missed.
Show All Class Members
You can view all members of the current class, including inherited members, with the click of a button. Just click on the class icon in the top-right corner of the editor window and a filterable list of all members will appear. Clicking on one will reveal it in an editor tab.
Show Plan
Using SQL in your ObjectScript code is a popular way to take advantage of InterSystems IRIS's powerful multi-model capabilities. However, writing performant SQL queries can be a challenge. That's why InterSystems added the ability to view the execution plan of SQL statements with one click right from your editor tab. Just click the Show Plan button above class queries and Embedded SQL statements and a webview displaying ther execution plan will appear beside your code.
Open InterSystems Document
A neat feature of VS Code is that it allows you to have multiple root folders open at once. It's also common to have many files in each folder, which makes navigating to a file using the explorer UI cumbersome at times. While VS Code has commands for quickly opening a file by name, that is usually different than the InterSystems name for the document (for example, the file path for User.Test.cls will often be /User/Test.cls). In response to this discrepancy, InterSystems added a command to open a file using the InterSystems name for it. After selecting a workspace folder, a file explorer picker is shown. Users can browse for the file to open using it, or enter the name directly in the text box and press Enter. The command accepts dots for package separators and the short form for %Library classes.
Open Error Location
When trying to identify the cause of an error, a good first step is go to the source. If you have the error location handy, VS Code has a command that will open the exact line for you, even if it's in a generated routine that isn't in your workspace folder. From the command palette, type Open Error Location... and run the command. A text box will appear that accepts a location in an INT routine in the form label+offset^routine. Submitting the form will open that location in an editor tab if the source code exists. A user can then use the View Other command to open the equivalent line in the higher level source file if applicable.
As always, feedback and issues reports can always be made on GitHub. Thanks for reading and happy coding!