VS Code November Release – Most Important New Changes for AL Developers

VS Code November Release – Most Important New Changes for AL Developers

Last week the new November release of Visual Studio Code was published. There are a lot of changes in this release. In this post here I want to show a few changes that caught my attention. This post is not meant to document all changes, but only the most interesting ones for me. You can find a complete overview following this link.

A little spoiler: There is an awesome snippet deactivation feature in this release!

Preview Editor Improvements

There have been some changes to the Preview Editor in Visual Studio Code. To understand these changes, I first had to check what Preview Mode even is.

If you left-click on a file in the File Explorer, it will be opened in preview mode. It can be recognized by the fact that the file name is displayed in italics in the editor. This preview mode causes that when you click on another file in the file explorer, you do not create a new tab for the file, but use the previous tab for the new file. This is useful if you are quickly browsing files and don’t want every visited file to have its own Tab.

If you click on a file with your mouse wheel, it will be opened in non-preview mode. Each file clicked with the mouse wheel gets its own tab. The next screenshot illustrates the whole thing:

The following two changes were made to the preview mode. It is good to know this in order to understand why and when tabs are being reused or not.

When you start a code navigation (for example, with Go to Definition), the editor you start from will move out of preview mode and stay open, while the new editor will be in preview mode until you navigate further.

When you start a code navigation (for example, with Go to Definition), the editor you start from will move out of preview mode and stay open, while the new editor will be in preview mode until you navigate further.

A new menu item, Keep Editors Open, in the editor overflow menu allows you to quickly turn off preview editors altogether:

Undo File Operations in Explorer

I think this one speaks for itself.

The File Explorer now supports Undo and Redo for all file operations: delete, rename, copy, move, new file, and new folder. Make sure the focus is in the File Explorer and trigger the Undo or Redo commands and your last file operation will be undone or redone respectively. Keep in mind that we have separate undo stacks for the editor and the File Explorer, and we choose which one to undo based on focus.

Source Control

Some changes have been made in the source control area (GIT). None of the changes blew me away so much that I want to mention them here. You can find the detailed changes here.

Extensions

An extension’s details page now shows a context menu with all of the actions for an extension, like in the Extensions view.

Troubleshooting: Extension bisect

I really like this one. You can now trouble shoot your extensions and find out which extension causes problems in VS Code. For me this is the second best new feature after the snippet deactivation feature.

The true power of VS Code is its extensions: theme extensions add pretty colors and icons, language extensions provide IntelliSense and enable code navigation, debugger extensions enable you to drill into bugs. Sometimes it isn’t obvious if an issue is caused by an extension, and if so, by which extension. Until today, you needed to disable all extensions and then one by one re-enable extensions to find a problematic extension. This process is now getting easy with a new feature called extension bisect. It uses the binary search algorithm to quickly identify an extension that causes trouble. In essence, it disables half your extensions and asks you to check for the issue you were seeing. If the issue is gone, the bad extension must have been in the list of disabled extensions, not in the list of currently enabled extensions. This process is repeated until only a single extension is left.

You can start extension bisect via the Help > Start Extension Bisect command. It then guides you through the process of repeatedly disabling and re-enabling extensions. After each reload, you will be prompted to confirm if the issue is still there.

Keyboard Shortcuts editor

We’ve added several improvements to the Keyboard Shortcuts editor in this milestone.

You can now configure a keybinding for a command from the Command Palette, via the Configure Keybinding gear button on the right.

Clicking the gear button will open the Keyboard Shortcuts filtered on your command.

Hide inline details

Suggestions in VS Code have details that are displayed in a separate flyout beside the suggestion. The details view can be closed and then a preview of the details will be shown inline with the suggestions. Showing the details inline with the suggestion can take away too much space and so can now be disabled via a new boolean setting, editor.suggest.showInlineDetails.

Clicking the “arrow without tail” (is that a triangle? I don’t know) will expand the details of the snippet.

Hide Extension Snippet

This one is definitely a new killer feature I absolutely fell in love with. My favorite in the new features of this release.

Snippets contributed by extensions can now be hidden from IntelliSense. This feature is available from the Insert Snippet picker when you run Insert Snippet. Find an extension snippet that you want to hide, and select the eye-icon on the right.

So go ahead, open the command window and type “Insert Snippet”.

Search for your snippet and click on the eye: “Hide from IntelliSense”.

Hidden snippets aren’t showing in IntelliSense but can still be used via Insert Snippet. Last, when using Settings Sync, the hidden snippet preferences will be synchronized across your devices.

It seems that you cannot find all extension snippets with Insert Snippet though. I tried to find the snippets from the extension AL Toolbox but they were not in that list.

Enjoy the new features 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *