August 2020 (version 1.49)
Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. August 2020 (version 1.49) Update 1.49.1 : The update addresses these issues . Update 1.49.2 : The update addresses these issues . Update 1.49.3 : The update addresses these issues . Downloads for 1.49.3 Windows x64 Arm64 macOS Intel Linux .deb .rpm .tar.gz Snap Welcome to the August 2020 release of Visual Studio Code.
There are a number of updates in this version that we hope you will like, some of the key highlights include: Format modified text - Limit formatting to just the code you've changed. Change casing on Search and Replace - Change text casing during global Search and Replace. Source Control repositories view - Display pending changes per repository. Filter Debug Console output - Quickly filter and find debugging output. Improved JS debugger Auto Attach - "Smart" Auto Attach to Node.js scripts or test runners.
TypeScript optional chaining refactoring - Convert multiple checks to a concise optional chain. JSDoc @deprecated tag support - IntelliSense clearly shows APIs marked as deprecated. Notebook UX updates - Cell Status bar contributions, enhanced notebook diff editor. If you'd like to read these release notes online, go to Updates on code.visualstudio.com . Join us live at the VS Code team's livestream on Wednesday, September 16 at 9am Pacific (5pm London), to see a demo of what's new in this release and ask us questions live.
Insiders: Want to try new features as soon as possible? You can download the nightly Insiders build and try the latest updates as soon as they are available. And for the latest Visual Studio Code news, updates, and content, follow us on Twitter @code ! Editor Only format modified text When contributing to another project, the Format on Save and Format Document commands can cause unwanted updates because they format lines that you have not changed.
This behavior can result in large pull requests, which are hard to review, and touch code you didn't intend to modify. There is now a new feature to help limit unwanted changes: We added a new command Format Modified Lines , which allows you to only format new and changed lines. There is a new setting editor.formatOnSaveMode , which makes Format on Save only apply to modified lines. Note that modifications are defined by your source control provider, for example, changes as detected by Git, and that without changes in source control, no modified lines are formatted.
The Quick Diff indicator on the left side of the editor is a reliable hint for what lines will be formatted. This also requires that the active formatter supports to formatting only a portion of a document, which most popular formatters do. Format multiple selections The Format Selection command is now multi-cursor aware. Select multiple lines or statements, trigger Format Selection , and formatting will be applied to all sections.
Find cursor move on type control When typing in the Find input box, VS Code automatically searches and moves the cursor to the nearest find result. You can now control if the cursor should jump to the find matches while typing by configuring editor.find.cursorMoveOnType . When disabled, VS Code will only move the cursor when you press Enter/Shift+Enter . Below, when searching for the word 'bash', the cursor doesn't jump to bash_completion until Enter is pressed: Only show trailing whitespace There is a new option trailing for the editor setting editor.renderWhitespace to only show trailing whitespace.
"editor.renderWhitespace" : "trailing" Numeric font-weight values Numeric value support was added to the editor setting editor.fontWeight , which now accepts values in the range from 1 to 1000, in addition to the string values "normal" and "bold" . "editor.fontWeight" : 350 Workbench Case changing in regex replace In June, we added support for changing the case of regex matching groups while doing a Find/Replace in the editor.
This month, we've added the same feature for Search/Replace across the workspace. This is done with the modifiers \u\U\l\L , where \u and \l will upper/lowercase a single character, and \U and \L will upper/lowercase the rest of the matching group. Improved keybinding diagnostics To troubleshoot keybinding problems, there is now a command Developer: Toggle Keyboard Shortcuts Troubleshooting . This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.
You can then press your desired keybinding and check what keyboard shortcut VS Code detects and what command is invoked. For example, when pressing cmd+/ in a code editor on macOS, the logging output would be: [KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta') [KeybindingService]: \ Keyboard event cannot be dispatched. [KeybindingService]: / Received keydown event - modifiers: [meta], code: Slash, keyCode: 191, key: / [KeybindingService]: | Converted keydown event - modifiers: [meta], code: Slash, keyCode: 85 ('/') [KeybindingService]: | Resolving meta+[Slash] [KeybindingService]: \ From 2 keybinding entries, matched editor.action.commentLine, when: editorTextFocus && !editorReadonly, source: built-in.
The first keydown event is for the MetaLeft key ( cmd ) and cannot be dispatched. The second keydown event is for the Slash key ( / ) and is dispatched as meta+[Slash] . There were two keybinding entries mapped from meta+[Slash] and the one that matched was for the command editor.action.commentLine , which has the when condition editorTextFocus && !editorReadonly and is a built-in keybinding entry. Screencast mode customization There are several new settings so you can tune your screencast sessions: screencastMode.keyboardOverlayTimeout - Change the timeout (milliseconds) for the keyboard shortcut overlay. screencastMode.mouseIndicatorColor - Set the mouse indicator color (hex #RGB, #RGBA, #RRGGBB or #RRGGBBAA). screencastMode.mouseIndicatorSize - Control the mouse indicator size (pixels).
Source Control Source Control Repositories view The Source Control Repositories view (formerly known as Source Control Providers view) was reintroduced to allow finer grain control over which source control repositories should be visible in the Source Control view. As before, this view supports multiple selection so you can have multiple repositories visible at the same time. Debugging Debug Console filter The Debug Console now supports filtering, making it easier for users to find the output they are looking for, or to hide irrelevant logging output.
The filter also supports exclude patterns (for example, patterns starting with an exclamation mark ! ). The filter only applies to program output but not to evaluations run by a user. Like other input boxes in VS Code, you can use the up and down arrow keys to navigate between old filter inputs. In the short video below, the output is filtered to entries that include the text 'http', do not include the text 'http' (using the filter !http ), and then include the word 'Severity': UX improvements When debugging multiple sessions, VS Code now only renders the arrow in the glyph margin for the focused session.
This should make it easier for users to distinguish which editor Call Stack decoration belongs to the debug session the user is interested in. Large stack frames now show a Load All Stack Frames button to load all the remaining stack frames. Previously this was a Load More Stack Frames button, which would require multiple clicks for large stack traces. JavaScript debugger improvements Improved Auto Attach Auto Attach can now debug processes even without manually passing an --inspect flag to them.
When Auto Attach is turned on, by default VS Code uses its "smart" mode to debug any Node.js script outside of node_modules folders, as well as some common
The rest of this page is on the live site.