Visual Studio Code Size



Update 1.44.1: The update addresses this security issue.

Update 1.44.2: The update addresses these issues.

Downloads: Windows: UserSystem | Mac: 64 bit | Linux: snapdebrpmtarball

Welcome to the March 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:

  • Accessibility improvements - Easier diff view navigation, clearer role designations for UI controls.
  • Timeline view - See time-series events like Git commit history from within VS Code.
  • Better Quick Open for files - Navigate smoothly from files to symbols, filter files by folder name.
  • Extension Pack display - Quickly see what is bundled in an Extension Pack.
  • Persisted Undo/Redo stack - Undo/Redo stack preserved for reopened files.
  • Remote Development - Directly check out Pull Requests into containers, support for Kubernetes.
  • Settings Sync preview - Settings Sync now lets you share snippets and UI state across machines.
  • New Python tutorials - Tutorials for creating Python containers and building Data Science models.

Install via the Visual Studio Code Marketplace → In order for the extension to activate you must have tailwindcss installed and a Tailwind config file named tailwind.config.js or tailwind.js in your workspace. Developer community 2. Search Search Microsoft.com.

If you'd like to read these release notes online, go to Updates on code.visualstudio.com.

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!

Accessibility

This milestone we received great feedback from our community, which helped us identify and tackle many accessibility issues.

  • Diff view is now more accessible. Use F7 and ⇧F7 (Windows, Linux Shift+F7) to navigate through changes and use the Stage / Unstage / Revert Selected Ranges commands to stage, unstage, or revert the current change.
  • Better roles used across our widgets. The listbox role is used for the Suggest widget and Quick Pick, list for static lists, and document for read-only content such as the Welcome view and Markdown preview.
  • Tuned the behavior of our Quick Pick widget.
  • The current line CodeLens can now be shown in the Quick Pick with the Show CodeLens Commands For Current Line command.

Timeline view

The Timeline view is now out of preview and enabled by default. This is a unified view for visualizing time-series events (for example, Git commits, file saves, test runs, etc.) for a file. The Timeline view automatically updates showing the timeline for the currently active editor, by default. You can control this default behavior by toggling the eye icon in the view toolbar. Also, similar to other views, the Timeline view supports find or filter as you type.

The Timeline view is collapsed by default at the bottom of the File Explorer. Selecting the Timeline sash will expand the Timeline view.

In this release, the built-in Git extension contributes a timeline source that provides the Git commit history of the specified file. Selecting a commit will open a diff view of the changes introduced by that commit. A context menu provides commands to Copy Commit ID and Copy Commit Message. There is also a new Open Timeline command on the File Explorer's context menu, to quickly show the timeline for the selected file.

Here is the Timeline view in action:

Theme: Dark Amethyst

Additional timeline sources can be contributed by extensions (although the API is still in the proposed stage), which will be shown in the unified Timeline view. Extensions can also contribute menu items to the Timeline view, and to individual timeline items. You can also easily choose which sources you'd like included in the view.

Workbench

Quick Open rewrite

The Quick Open (⌘P (Windows, Linux Ctrl+P)) control was using an old version of our tree widget, and in this iteration, it was migrated to use our latest list control, already used in the rest of the VS Code UI. Functionally, you should not be able to tell the difference, as all commands will work as before.

We did take this opportunity to add some features that you might find useful.

Navigate from files to symbols

You can now continue to navigate to the symbols of a file result simply by typing @. For the file that is currently selected, all symbols will appear and the editor will open in the background to reveal the active symbol. The video below also shows that you can group symbols by category by following @ with :.

Filter results by separating multiple queries with spaces

If you are getting too many results for a file search, you can add more search patterns after typing a space. For example, you can narrow down results by folder if you type <file name> <folder name> one after the other.

Note: This also works for the editor (⇧⌘O (Windows, Linux Ctrl+Shift+O)) and workspace (⌘T (Windows, Linux Ctrl+T)) symbol picker. Any text after a space character will be used to filter by the container of that symbol.

Input is preserved when switching providers

If you leave Quick Open visible and switch to another provider (for example, from file search to symbol search), VS Code will apply whatever filter is typed and use it for the new provider. This allows you to quickly reuse the typed input for symbol search when it was previously used for a file search.

Sort editor history by most recently used

A new setting 'search.quickOpen.history.filterSortOrder': 'recency' allows you to sort editor history by the most recently opened items, even when starting to search. By default, editor history results will be sorted by relevance based on the filter pattern that was used.

New command to open editor to the side

A new command workbench.action.alternativeAcceptSelectedQuickOpenItem lets you add an additional keyboard shortcut to open files or symbols from Quick Open to the side. By default, Ctrl+Enter (macOS: Cmd+Enter) will open the file to the side in a new editor group, rather than in the current one.

Improved Extension Pack display

To identify Extension Packs in the Extensions view, there is now a number badge that shows the number of extensions included in the Extension Pack.

Theme: GitHub Sharp with Customizations

The Extension details page now shows all extensions bundled in the Extension Pack.

Theme: GitHub Sharp with Customizations

Adjust height of editor tabs scroll bar

A new setting workbench.editor.titleScrollbarSizing lets you increase the size of the scroll bar for editor tabs and breadcrumbs. This makes it easier to scroll through a long list of open editors.

Configure it to large for a larger scroll bar:

File Explorer can show hidden files

If a file is hidden (via the files.exclude setting) but it is open and visible in the editor, the file is shown in the File Explorer along with its parent chain. Those files and their parents are displayed in the File Explorer using a dimmed color as long as the file is visible in the editor area.

View: Reopen with

The new View: Reopen with command lets you reopen the currently active file using a different custom editor.

You can use this command to switch between VS Code's standard text editor and the custom editor, or to switch between multiple custom editors for a resource.

workbench.editorAssociations setting

Also for custom editors, the new workbench.editorAssociations setting lets you configure which editor is used for a specific resource.

The example below configures all files ending in .catScratch to open using the example custom text editor from our extension samples.

View progress now shown on the view

We have changed progress indication for custom views to now show on each view itself, rather than at the top of the view container. This allows for a more direct connection between the long-running operation and its progress. There is also a new API option for extensions to show custom progress on views as well.

Here you can see the progress display on the GitLens extension view:

New default monospace font

We have updated the monospace font used in VS Code UI to:

This change does not affect the font choice in the editor.

Editor

Keep Undo stack when reopening files

VS Code will now keep the Undo/Redo stack of a file when the file is closed. When the file is reopened, if its contents hasn't changed since it was closed, the Undo/Redo stack will be restored.

This is very useful if you limit the number of open editors with the workbench.editor.limit.value setting or you accidently close a file you are working on.

Visual

Explicit ordering for Code Actions on save

You can now set editor.codeActionsOnSave to an array of Code Actions to execute in order. You can use this to guarantee that a specific Code Action is always run before or after another one that may conflict with it.

The following editor.codeActionsOnSave will always run Organize Imports followed by Fix All once organize imports finishes:

Using editor.wordSeparators for Next Find Match

The command Add Selection to Next Find Match (⌘D (Windows, Linux Ctrl+D)) now respects the setting editor.wordSeparators. Previously, the command would use the word definition as defined by the current file's language.

Debugging

Call Stack view improvements

The CALL STACK view is a complex view because it shows different types of objects (sessions, processes, threads, stack frames, and separator elements) and provides different actions for different types. In order to make it easier to differentiate the object types and to understand their supported interactions, we have started to make some visual improvements:

  • Debug sessions are now decorated with an icon.
  • Clickable elements use the link color.
  • Smaller separator and presentation elements.

New Debug Console icon

We've introduced a new icon for the Debug Console and also use it in the Activity Bar when the Debug Console view is moved from the panel.

Progress feedback UI for debug extensions

VS Code now supports the 'progress events' that were proposed for the Debug Adapter Protocol (DAP) in the last milestone. With progress events, a debug extension can provide feedback to users for long running operations.

The VS Code debugging UI shows progress feedback in two locations:

  • As a progress bar at the top of the debug view.
  • As a 'silent notification', which means that progress is shown 'silently' (without interrupting the user) in the Status bar and can be opened into a notification by clicking on it. The notification shows more detailed information and allows cancellation of the underlying long running operation (if the operation supports cancel).

In order to avoid flicker for short operations, the progress UI only starts after a 0.5 second delay.

The following video shows the new progress UI for a (simulated) long running operation in Mock Debug (the only supporting debug extension as of today). We expect that other debug extensions will adopt the progress support soon.

Code completion selection in the Debug Console

In the last milestone, we added selection control to the 'completion' request of the Debug Adapter Protocol. With this release, VS Code now fully supports the protocol addition and a debug extension can adjust the selection (or insertion point) after a completion item has been inserted.

Integrated Terminal

Allow menu bar mnemonics to skip the terminal

When the new setting terminal.integrated.allowMenubarMnemonics is enabled, all keystrokes using Alt will skip the terminal so they are processed by VS Code's keybinding manager, making all menu mnemonics work at the cost of Alt hotkeys within the terminal. This setting is disabled by default.

Languages

Auto import style in JavaScript

The new javascript.preferences.importModuleSpecifierEnding setting lets you control the style of imports that VS Code's auto imports use. This can be useful if you are writing code for platforms such as browsers that support native ES6 modules.

Possible values are:

  • auto - The default. Uses the project's jsconfig to determine the import style to use.
  • minimal - Use's Node.js style imports. This shortens imports for src/component/index.js to src/component.
  • index - Include the index part of the path as well. This shortens src/component/index.js to src/component/index.
  • js - Use the full path, including the file extension (.js).

Tasks

Faster task Quick Pick

The task Quick Pick used to fetch all tasks from all task-providing extensions before displaying the list of tasks to choose from. Now, VS Code doesn't fetch any additional extension tasks before showing the Quick Pick dropdown, making it much faster. Extension contributed tasks are also only fetched when you ask for them, which frees up the extension host.

Below the TypeScript contributed tsc tasks are only fetched after the user selects the typescript extension.

Theme: One Dark Pro

Preview features

Preview features are not ready for release but are functional enough to use. We welcome your early feedback while they are under development.

Settings Sync

We have been working the last couple of months to support synchronizing VS Code settings, extensions, and keyboard shortcuts across machines and this feature is available for preview on the Insiders release.

In this milestone, we added synchronizing User Snippets and more UI State.

Theme: GitHub Sharp with Customizations

Currently the following UI State is synchronized:

  • Display Language
  • Activity Bar entries
  • Panel entries
  • Views layout and visibility
  • Recently used commands
  • 'Do not show again' notifications

Note: At present, only user language snippets are synchronized. Support for global snippets will be added in the next milestone.

We also added remote and local sync backup views for restoring your data and to aid in trouble shooting. You can access these views using the commands Preferences Sync: Show Remote Backup and Preferences Sync: Show Local Backup.

Theme: GitHub Sharp with Customizations

To learn more, you can go to the Settings Sync documentation.

Account management

Extensions that contribute an Authentication Provider will now have their accounts appear on a new Accounts context menu above the settings gear. You can view all accounts you are currently signed into, sign out of them, and manage trusted extensions. Signing into a Microsoft account from here is another way to start Settings Sync.

Theme: Pop Light with Customizations

New JavaScript debugger

This month we've continued making progress on our new JavaScript debugger. It's installed by default on Insiders, and can be installed from the Marketplace in VS Code Stable. You can start using it with your existing launch configurations by enabling the debug.javascript.usePreview setting. Here are some new features added this month:

Link handling in the debug terminal

You could use the debug terminal (Debug: Create JavaScript Debug Terminal) to automatically debug any Node.js process. Now, the debugger also handles links to start debugging your browser whenever you Cmd/Ctrl+Click on links, no configuration needed.

Theme: Earthsong, Font: Fira Code

Reference $returnValue in Watch and Debug Console

When it's available in the call stack, you can now reference a function's $returnValue in the Debug Console and Watch expressions.

TypeScript 3.9 Beta support

Visual Studio Code Size

This iteration we added support for the new TypeScript 3.9 Beta features. Some highlights of TypeScript 3.9 include:

  • Suggestions for the // @ts-expect-error directive.
  • Refactorings that better preserve newlines and formatting.
  • Auto imports in JavaScript can now add common JS style imports (require(...)).

You can try the new TypeScript 3.9 features today by installing the TypeScript Nightly extension. Please share feedback and let us know if you run into any bugs with the TypeScript 3.9 beta!

Increased view placement flexibility

For several iterations, we have worked to improve the flexibility of our layout by allowing individual views to be moved around. With this iteration, we not only added features but also polished the experience.

New Drag and Drop experience

The dragging and dropping of Activity Bar icons, panels, and views within the Side Bar has been simple, but ambiguous. It could be difficult to know exactly what was going to happen when you actually dropped any of those items. The new experience aims to improve clarity and highlight the new features we are enabling along the way.

Below, the user begins by reordering views within the Side Bar, followed by reordering tabs in the Panel and icons in the Activity Bar:

Multiple views in a single panel

You can now have multiple views within a single panel to make better use of horizontal space. One common request is to see the terminal at the same time as the Problems view. This can now be done by dragging the terminal into the Problems view as shown below.

Creating new Side Bar groups and moving panels

It is now possible to move views to new Side Bar groups, creating a new icon entry in the Activity Bar. The built-in panels are no exception and can now be moved into the existing Side Bar entries or their own entries.

The next video shows the user dragging the Terminal into the Activity Bar, which creates a Terminal icon and space for the Terminal in the Side Bar. Next, the user drops Output within the Terminal Side Bar. Finally, Outline is moved from the Explorer into the Activity Bar, creating its own Side Bar area.

Contributing a View Container to the panel

We now have everything required to allow an extension to contribute a view directly to the panel, much like you can today with the Activity Bar, which is documented in the Tree View API guide. Note that this feature is still in preview and the Tree View documentation will not reflect these changes until they are considered stable. However, to try it out, you can update the snippet in the documentation to this:

Commands for view movement

Finally, there are new commands to move views with the keyboard and to reset your layout. The command View: Move Focused View (workbench.action.moveFocusedView) has been updated to support the new features of the iteration. The command View: Reset Focused View Location (workbench.action.resetFocusedViewLocation) was added to place an individual view back into its default location.

Activity Bar icons for panel and custom views

With the introduction of the flexible layout, there are now dedicated icons for the default panel views when they move into the Activity Bar. There is also a (default) icon for custom views when combining multiple views.

Synced Regions

We have improved the mirror cursor feature introduced last November with a new implementation called Synced Regions. Currently this feature is available for HTML and you can try it out by one of the following ways:

  • Running the command On Type Rename Symbol on an HTML tag (bound to by default).
  • Turning on the editor.renameOnType setting and move the cursor to an HTML tag.

The red regions are Synced Regions. As their name suggests, any change in one region will be synced to other regions. You can exit this mode by either moving your cursor out of the regions or pressing ESC. Additionally, typing or pasting any content leading with a whitespace in any region exits this mode.

We look forward to providing an API that could make this rename-on-type experience available to other languages such as JSX, XML, or even local variables in TypeScript.

Contributions to extensions

Visual Studio Code For Beginners

Remote Development

Work continues on the Remote Development extensions, which allow you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment.

Feature highlights in 1.44 include:

  • Remote - Containers: Check out a PR directly into a container.
  • Remote - Containers: Kubernetes container attach support.
  • Remote - Containers: Experimental WSL 2 Docker engine support.

You can learn about new extension features and bug fixes in the Remote Development release notes.

Extension authoring

Welcome View Content API

Certain views now support Welcome content contributed from extensions. Refer to the original issue for more information. For details about how to use this API with extension provided views, you can read the Tree View documentation.

This API was added as proposed in the last milestone and we have now finalized it.

Semantic tokens provider API

The semantic tokens provider API has now been finalized.

Theme support for semantic tokens

Color themes can now write rules to color semantic tokens reported by language extensions like TypeScript.

The rule above defines that all declarations of readonly variables in Java should be colored green and bold.

The Semantic Highlighting Wiki Page has more information.

TypeScript semantic token improvements

More semantic token types are returned by the Typescript Language Server. Color themes can take advantage of these new token types for styling.

  • All symbols from the JavaScript default library get a defaultLibrary modifier.
  • Function parameters that are callbacks are classified as function.

Read the TypeScript Semantic Highlighting plugin README for an overview of all semantic token types and modifiers returned by the TypeScript language server.

File system error code

We have added FileSystemError#code, which is a string identifying the error. When a file system error is created through any of its factory functions, then code is the name of that function, for example FileSystemError.FileNotFound(msg).code 'FileNotFound'.

Arguments for StatusBarItem.command

Visual Studio Code Size

StatusBarItem.command now accepts a full Command object instead of just a command ID. This lets extensions pass arguments to the command when the Status bar item is activated.

Custom text editors

With custom text editors, extensions can now replace VS Code's standard editor with a custom webview-based view for specific text-based resources. Potential use cases include:

  • Previewing assets, such as shaders or .obj files.
  • Creating WYSIWYG editors for markup languages such as XAML.
  • Providing alternative, interactive views of data files such as JSON or CSV.

The custom editors documentation covers how to use the new custom text editor API and how to make sure your new editor works well with VS Code. Also be sure to check out the custom editors extension sample.

Next iteration, we're hoping to finalize the full custom editor proposal that extends custom editors to also support binary files.

View-level progress indication

We've added a new option to the ProgressOptions.location of the window.withProgress API to allow progress to be shown on a specific view. To use, set ProgressOptions.location = { viewId: <view-id> }; where <view-id> specifies the ID of the view you'd like to show progress for. There is short video of this in action in the view progress section above.

Extensions view context menu when-clause context

We've added a new extension when-clause context to the Extension view's context menu, which contains the extension's identifier.

Example:

New Codicons

We've added the following icons to the Codicon library:

  • account
  • bell-dot
  • debug-console
  • library
  • output
  • run-all
  • sync-ignored

Documentation for writing embedded language server

Window

Writing language server for embedded programming languages is more involved than writing a plain language server. Given the popularity of embedded languages today, we added an Embedded Languages topic to our Language Extensions section. The documentation contains two samples to illustrate the two approaches to building embedded language servers: Language services and Request forwarding. Start by reviewing the Embedded Languages documentation or go directly to the two samples:

Debug Adapter Protocol

New progress events

We've finalized support for reporting progress in the Debug Adapter Protocol. Debug adapters can now send progress events (progressStart, progressUpdate, and progressEnd) to the frontend client, in order to display progress for long running debug adapter operations. The progressStart event can be marked as cancellable to make the client present a cancellation UI and send an cancel request. In order to enable progress events in a supporting debug adapter, the frontend client needs to include the new client capability supportsProgressReporting in the initialize request.

More details can be found in the corresponding DAP feature request. VS Code supports progress events starting with this milestone.

Clipboard context value for the 'evaluate' request

DAP clients (frontends) use the evaluate request when copying variable and expression values to the clipboard. To help debug adapters detect this scenario, a new value clipboard has been added to the value set for the context argument that is passed to the evaluate request. To ensure backward compatibility, a client is only allowed to pass the new value if the debug adapter returns a supportsClipboardContext capability.

Language Server Protocol

A new version (0.5.0) of the Language Server Index Format specification has been published. The version supports linking reference results across project dumps using monikers. In addition, new versions of the LSP client (6.2.0-next.2) and server (6.2.0-next.2) libraries have been published.

Proposed extension APIs

Every milestone comes with new proposed APIs and extension authors can try them out. As always, we are keen on your feedback. This is what you have to do to try out a proposed API:

  • You must use Insiders because proposed APIs change frequently.
  • You must have this line in the package.json file of your extension: 'enableProposedApi': true.
  • Copy the latest version of the vscode.proposed.d.ts file into your project's source location.

Note that you cannot publish an extension that uses a proposed API. There may be breaking changes in the next release and we never want to break existing extensions.

Terminal link handlers

This new API allows extensions to intercept and handle links that are clicked in the terminal.

Contribute to terminal environments

This new API allows extensions to change environment variables when the terminal is starting up.

These collections are extension and workspace-specific and VS Code handles how conflicts between multiple extensions are dealt with. They can optionally be persisted across window reloads and care was taken to ensure this is done in such a way that terminals created immediately after the window is loaded do not block on the extension host launching but instead use the last known version. These persisted collections can get removed by disposing of the collection or creating a new non-persistent collection, or when the extension is uninstalled.

Vscode Increase Font Size

The plan is to surface these environment modifications to the user through some indicator that allows updating 'stale' terminal environments but this is still a work in progress. You can follow the discussion in issue #46696.

Browser support

Remote indicator

When using VS Code in a browser, there is now a remote indicator. This lets you know the remote environment you are connected to and allows extensions to add additional commands associated with the remote. With this change, the Open in Desktop link was removed from the Status bar and will move into the remote picker.

Note: VS Code currently does not support connecting to a different remote - such as SSH, a container, or WSL - from the browser.

Navigational links

A new menu location lets extensions running in the browser contribute links to the hamburger menu in the upper left.

Engineering

VS Code compiles to ES6

VS Code has adopted ES6 - all the way. Thanks to TypeScript, we have been using ES6 syntax for a long time, but we now assume that the target runtime also supports ES6. This allows us to use ES6 'globals' like Strings#endsWith and allows the use of new language features, like generator-functions and symbols.

Automating issue triage with GitHub Actions

This iteration we migrated our existing triage automations from using GitHub Apps over to GitHub Actions. With this came some nice benefits, such as getting logs in the vscode repo, and an increase in development speed. We additionally added several new automations, such as an Action that notifies issue authors when fixes get pulled into VS Code Insiders, allowing authors to quickly verify whether fixes are effective.

The full set of Actions we use is released on GitHub under an MIT license.

Documentation and extensions

Python

There are two new Python tutorials:

  • Python in a container - Learn how to build a Python application in a Docker container.
  • Python for Data Science - Use Python data science libraries to create a machine learning model.

C++

The C++ extension tutorials have been rewritten and there is a new tutorial specific to Using C++ on Linux.

Docker extension

The 1.0 version of the Microsoft Docker extension is now available. The extension can add Docker files to your project, build and debug Docker images, and includes an Explorer to easily start, stop, inspect, and remove containers and images.

Azure extensions

There are two new extensions for working with Azure assets directly from within VS Code.

  • Azure Virtual Machines - Create Ubuntu Virtual Machines with pre-configured SSH access so you can connect to them using the Remote-SSH extension.

  • Azure Resource Groups - View all of your Azure Resources and quickly navigate to them in the Azure View.

Notable fixes

  • 75932: Debug failed to load: Process picker failed (your 131072x1 screen size is bogus, expect trouble)
  • 84271: Add 'x' to remove a file from recently opened (quick pick)
  • 89658: No debug adapter found
  • 92381: 'Add folder to workspace' prompt duplicates itself if you add and then remove a folder from the workspace repeatedly
  • 93344: Welcome view should scroll
  • 93634: Progress: let window progress turn into silent notification progress

Thank you

Last but certainly not least, a big Thank You! to the following folks that helped to make VS Code even better:

Contributions to our issue tracking:

Contributions to vscode:

  • Andrew Branch (@andrewbranch): [typescript-language-features] Add importModuleSpecifierEnding preference PR #90405
  • Andy Barron (@AndyBarron): editor.codeActionsOnSave: support both object and array configs PR #92681
  • Benny Neugebauer (@bennyn): fix typing for proxy auth window options PR #91954
  • Benno (@blueworrybear): update #91296 allow multiple workspace roots PR #92082
  • Charles Gagnon (@Charles-Gagnon): Alert input box messages anytime shown PR #92531
  • Gustavo Sampaio (@GustavoKatel): Easy pick codelenses with keyboard shortcut PR #91232
  • Huachao Mao (@Huachao): Fix typo of word extension PR #93178
  • Hyun Sick Moon (@hyun6): fix typo PR #93291
  • Ilia Pozdnyakov (@iliazeus)
    • Add error code getter to FileSystemError #90517 PR #90586
    • Add a default value to FileSystemError#code #90517 PR #92427
  • @jaqra: Fix search view 'Toggle Search Detail' padding PR #91429
  • Jean Pierre (@jeanp413)
    • Show warning when filename start/end with whitespace in explorer inputbox PR #92221
    • Fixes no link detection in SCM input box PR #89868
    • Fixes webview inside diff editor doesn't gain focus PR #91830
    • Fixes untitled editor name changes when double click on tab title container PR #93165
  • Jonas Dellinger (@JohnnyCrazy): Allow users to make the scrollbars in the title area larger PR #92720
  • @nrayburn-tech: Use ResizeObserver for monaco editor automaticLayout PR #93630
  • Raul Piraces Alastuey (@piraces): Fix history entries navigation taking extra navigates in debug console PR #93125
  • Robert Rossmann (@robertrossmann): Inherit theme text colour in Settings Editor's section headings PR #93605
  • Sharak (@SharakPL): WebView width fix PR #93085
  • Tobias Hernstig (@thernstig): Add .npmrc file association as ini-file PR #92397
  • Matej Urbas (@urbas)
    • fileSearch: removed unused size and redundant basename fields from IRawFileMatch PR #91458
    • file search: include workspace folder in filter PR #89765
  • Alvaro Videla (@videlalvaro)
    • fixes #92860 PR #92862
    • fixes #92863 PR #92865
  • David Teller (@Yoric): Fixes #91913 : Exclude /.hg/store/ from the file watcher PR #91941

Our accessibility community for providing constant feedback! To name a few:

Contributions to vscode-vsce:

  • Bob Brown (@bobbrow): Change a console.warn to console.log for an informational message PR #434
  • James George (@jamesgeorge007)
    • Fixed markdown-it security vulnerability PR #437
    • Migrate to a better matching engine PR #436

Contributions to language-server-protocol:

  • Aleksey Kladov (@matklad): Add link to section PR #942

Contributions to vscode-languageserver-node:

  • Remy Suen (@rcjsuen): Reword type and modifier descriptions PR #588
  • Tom Raviv (@tomrav): Fix npm badges in text-document package readme PR #592
  • Heejae Chang (@heejaechang):
    • added file-based cancellation support to JSON-RPC PR #587
    • added cancellation tests in json rpc PR #596
    • re-export MessageConnection so that vscode-languageserver/client is s… PR #598

Contributions to vscode-generator-code:

  • Sibiraj (@sibiraj-s): Remove deprecated useColors mocha api PR #196

Contributions to vscode-loader:

  • Roberto Araujo (@Roberto-Araujo): Use head instead document.head PR #26

Contributions to localization:

There are over 800 Cloud + AI Localization community members using the Microsoft Localization Community Platform (MLCP), with over about 170 active contributors to Visual Studio Code. We appreciate your contributions, either by providing new translations, voting on translations, or suggesting process improvements.

Here is a snapshot of contributors. For details about the project including the contributor name list, visit the project site at https://aka.ms/vscodeloc.

  • Chinese (Simplified, China) Tingting Yi, Yizhi Gu, Charles Dong, Justin Liu, Joel Yang, Tony Xia, 朱知阳, meng shao, 普鲁文, paul cheung, 张锐, Yiting Zhu, Nong Zhichao, Liam Kennedy, 武 健, Zhao Liguo, 宁 倬, Bochen Wang, 一斤瓜子, 顺 谭, 云 何, Yun Liu, yungkei fan.
  • Chinese (Traditional, Taiwan) 船長, Winnie Lin, 予 恆.
  • Czech David Knieradl.
  • Danish (Denmark) Javad Shafique, Lasse Stilvang.
  • English (United Kingdom) Martin Littlecott, Oren Recht, Faris Ansari.
  • Finnish (Finland) Teemu Sirkiä.
  • French (France) Antoine Griffard, Thierry DEMAN-BARCELÒ, Rodolphe NOEL, Nathan Bonnemains.
  • Hebrew (Israel) Chayim Refael Friedman, Asaf Amitai.
  • Indonesian (Indonesia) Gerry Surya, Laurensius Dede Suhardiman.
  • Italian (Italy) Alessandro Alpi, Riccardo Cappello.
  • Japanese (Japan) Ikko Ashimine, Aya Tokura, Takayuki Fuwa, ちゃん きさらぎ, 住吉 貴志, Koichi Makino, Yoshihisa Ozaki, TENMYO Masakazu.
  • Korean (Korea) Kyunghee Ko, June Heo.
  • Norwegian (Norway) Torbjørn Viem Ness.
  • Polish (Poland) Makabeus Orban, Kacper Łakomski.
  • Portuguese (Brazil) Alessandro Trovato, Marcelo Fernandes, Arthur Lima, Luciana de Melo, Luiz Gustavo Nunes.
  • Portuguese(Portugal) Pedro Filipe.
  • Russian (Russia) Andrey Veselov, Vadim Svitkin, Минаков Антон.
  • Spanish (Spain, International Sort) Sifredo Da Silva, Ariel Costas Guerrero, David Roa, Abdón Rodríguez P., Luis Manuel, Carlos A. Echeverri V.
  • Swedish (Sweden) Per Ragnar Edin.
  • Tamil (India) krishnakoumar c.
  • Turkish (Turkey) Umut Can Alparslan, Mehmet Yönügül.
  • Ukrainian (Ukraine) Nikita Potapenko.
  • Vietnamese (Vietnam) Hieu Nguyen Trung.

Visual Studio Code allows you to debug Java applications through the Debugger for Java extension. It's a lightweight Java debugger based on Java Debug Server, which extends the Language Support for Java by Red Hat.

Here's a list of supported debugging features:

  • Launch/Attach
  • Breakpoints
  • Exceptions
  • Pause & Continue
  • Step In/Out/Over
  • Variables
  • Call Stacks
  • Threads
  • Debug Console
  • Evaluation
  • Hot Code Replace

The Java debugger is an open-source project, which welcomes contributors to collaborate through GitHub repositories:

If you run into any issues when using the features below, you can contact us by clicking the Report an issue button below.

Install

For the debugger to work, you also need to have the Language Support for Java(TM) by Red Hat extension installed. To make it easier, there is a Java Extension Pack, which bundles the Language Support for Java(TM) by Red Hat, the Debugger for Java and several other popular Java extensions.

You can manually install the extension pack from the Extensions view (⇧⌘X (Windows, Linux Ctrl+Shift+X)) by typing vscode-java-pack in the search box. You will also be prompted to install the Java Extension Pack when you edit a Java file in VS Code for the first time.

For more details, please read Java tutorial.

Configure

By default, the debugger will run out-of-box by automatically finding the main class and generate the default configuration for you to launch your application.

If you would like to create your configuration and save it, you can click the create a launch.json file link in the Run view where you will also find the Debug and Run buttons.

The launch.json file is located in a .vscode folder in your workspace (project root folder) or in your user settings or workspace settings.

It's possible to create multiple debugging configurations for your project and select the desired one to run.

If you want to debug current file, there is a convenient setting, so the editor will choose currently active file as the entry point.

For more details on how to create the launch.json, please read Launch configurations; for more details on configuraiton options for Java, please read Configuration options.

Use

To run and debug your Java application, there are several entry points for starting a debugging session.

CodeLens

You will find Run|Debug on the CodeLens of your main() function.

You can disable the CodeLens if you prefer, with the Enable Run Debug CodeLens setting. While CodeLens is disabled, you can still access the Run|Debug actions by hovering over your main() function.

Context menu

Another way to start debugging is to right-click a Java file in the File Explorer or editor and select Run or Debug in the context menu.

Pressing F5

Pressing F5, the debugger will automatically find the entry point of your project and start debugging. You can also start a debugging session from the Run menu or the Run view opened by the Run icon in the Activity Bar on the side of VS Code. See more at Debugging in VS Code.

Debugging single files

VS Code can run and debug single Java files without any project.

Debugging external files

The Java debugger also supports external source files. This lets you debug third-party classes when they are inside a JAR or a source attachment. Set your breakpoints in those classes before you start debugging. You can also attach missing source code with a zip/jar file using the Context menu Attach Source action.

Java 9 and newer versions are supported with VS Code Java Debugger as well.

Threads

You can see all the running threads in the Call Stack pane and work with individual thread using the context menu.

Debug session inputs

The default Debug Console in VS Code doesn't support inputs. If your program need inputs from a terminal, you can use the Integrated Terminal (⌃` (Windows, Linux Ctrl+`)) within VS Code or an external terminal to launch it.

Step filtering

Step filter is supported by the extension to filter out types that you do not wish to see or step through while debugging. With this feature, you can configure the packages to filter within your launch.json so they could be skipped when you step through.

Expression evaluation

The debugger also lets you evaluate expressions in the WATCH window as well as the Debug Console. You can also use this feature for conditional breakpoint setting.

Currently, the VS Code Java Debugger uses the Integrated Terminal as the default console, which doesn't support expression evaluation. In order for the console to use this feature, you need to change the console to use the Internal Console in launch.json.

If you'd like to use that setting each time you launch a Java program, you can configure it as a global user setting with java.debug.settings.console.

Conditional breakpoint

With the help of expression evaluation, the debugger also supports conditional breakpoint. You can set your breakpoint to break when expression evaluates to true.

Data breakpoint

You can have the debugger break when a variable change its value. Note that the data breakpoint can only be set inside a debug session. This means you need to launch your application and break on a regular breakpoint first. You can then pick a field in the VARIABLES view and set a data breakpoint.

Hot Code replacement

Another advanced feature the debugger supports is 'Hot Code' replacement. Hot code replacement (HCR) is a debugging technique whereby the Java debugger transmits new class files over the debugging channel to another Java Virtual Machine (JVM). HCR facilitates experimental development and fosters iterative trial-and-error coding. With this new feature, you can start a debugging session and change a Java file in your development environment, and the debugger will replace the code in the running JVM. No restart is required, which is why it's called 'hot'. Below is an illustration of how you can use HCR with Debugger for Java in VS Code.

You may use the debug setting java.debug.settings.hotCodeReplace to control how to trigger Hot Code replacement. The possible setting values are:

  • manual - Click the toolbar to apply the changes (default).
  • auto - Automatically apply the changes after compilation.
  • never - Disable Hot Code replacement.

Logpoints

Logpoints is also supported by Java Debugger. Logpoints allow you to send output to debug console without editing code. They're different from breakpoints because they don't stop the execution flow of your application.

Configuration options

Studio

There are many options and settings available to configure the debugger. For example, configuring the current working directory (cwd) and environment variables is easily done with launch options.

Consult the documentation for the Language Support for Java by Red Hat extension for help with setting up your project.

For many commonly used setups, there are samples available in VS Code Java Debugger Configuration. The document explains how the Java debugger automatically generates configurations for you, and if you need to modify them, how to do so with Main class, different arguments, environment, attaching to other Java processes, and usage of more advanced features.

Below are all the configurations available for Launch and Attach. For more information about how to write the launch.json file, refer to Debugging.

Launch

  • mainClass (required) - The fully qualified class name (for example [java module name/]com.xyz.MainApp) or the java file path of the program entry.
  • args - The command-line arguments passed to the program. Use '${command:SpecifyProgramArgs}' to prompt for program arguments. It accepts a string or an array of string.
  • sourcePaths - The extra source directories of the program. The debugger looks for source code from project settings by default. This option allows the debugger to look for source code in extra directories.
  • modulePaths - The modulepaths for launching the JVM. If not specified, the debugger will automatically resolve from current project.
  • classPaths - The classpaths for launching the JVM. If not specified, the debugger will automatically resolve from current project.
  • encoding - The file.encoding setting for the JVM. If not specified, 'UTF-8' will be used. Possible values can be found in Supported Encodings.
  • vmArgs - The extra options and system properties for the JVM (for example -Xms<size> -Xmx<size> -D<name>=<value>), it accepts a string or an array of string.
  • projectName - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. This setting also works when the debugger looks for the specified main class when launching a program. It is required when the workspace has multiple Java projects, otherwise the expression evaluation and conditional breakpoint may not work.
  • cwd - The working directory of the program. Defaults to ${workspaceFolder}.
  • env - The extra environment variables for the program.
  • stopOnEntry - Automatically pause the program after launching.
  • console - The specified console to launch the program. If not specified, use the console specified by the java.debug.settings.console user setting.
    • internalConsole - VS Code debug console (input stream not supported).
    • integratedTerminal - VS Code Integrated Terminal.
    • externalTerminal - External terminal that can be configured in user settings.
  • shortenCommandLine - When the project has long classpath or big VM arguments, the command line to launch the program may exceed the maximum command-line string limitation allowed by the OS. This configuration item provides multiple approaches to shorten the command line. Defaults to auto.
    • none - Launch the program with the standard command line 'java [options] classname [args]'.
    • jarmanifest - Generate the classpath parameters to a temporary classpath.jar file, and launch the program with the command line 'java -cp classpath.jar classname [args]'.
    • argfile - Generate the classpath parameters to a temporary argument file, and launch the program with the command line 'java @argfile [args]'. This value only applies to Java 9 and higher.
    • auto - Automatically detect the command-line length and determine whether to shorten the command line via an appropriate approach.
  • stepFilters - Skip specified classes or methods when stepping.
    • classNameFilters - Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
    • skipSynthetics - Skip synthetic methods when stepping.
    • skipStaticInitializers - Skip static initializer methods when stepping.
    • skipConstructors - Skip constructor methods when stepping.

Attach

  • hostName (required) - The host name or IP address of remote debuggee.
  • port (required) - The debug port of remote debuggee.
  • timeout - Time out value before reconnecting, in milliseconds (default to 30000 ms).
  • sourcePaths - The extra source directories of the program. The debugger looks for source code from project settings by default. This option allows the debugger to look for source code in extra directories.
  • projectName - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. It is required when the workspace has multiple Java projects, otherwise the expression evaluation and conditional breakpoint may not work.
  • stepFilters - Skip specified classes or methods when stepping.
    • classNameFilters - Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
    • skipSynthetics - Skip synthetic methods when stepping.
    • skipStaticInitializers - Skip static initializer methods when stepping.
    • skipConstructors - Skip constructor methods when stepping.

User Settings

  • java.debug.logLevel: Minimum level of debugger logs that are sent to VS Code, defaults to warn.
  • java.debug.settings.showHex: Show numbers in hex format in Variables, defaults to false.
  • java.debug.settings.showStaticVariables: Show static variables in Variables, defaults to false.
  • java.debug.settings.showQualifiedNames: Show fully qualified class names in Variables, defaults to false.
  • java.debug.settings.showLogicalStructure: Show the logical structure for the Collection and Map classes in Variables, defaults to true.
  • java.debug.settings.showToString: Show 'toString()' value for all classes that override 'toString' method in Variables, defaults to true.
  • java.debug.settings.maxStringLength: The maximum length of strings displayed in Variables or Debug Console. Strings longer than this limit will be trimmed. The default is 0, which means no trim is performed.
  • java.debug.settings.hotCodeReplace: Reload the changed Java classes during debugging, defaults to manual. Make sure java.autobuild.enabled is not disabled for VSCode Java. See the Hot Code Replace wiki page for more information about usages and limitations.
    • manual - Click the toolbar to apply the changes.
    • auto - Automatically apply the changes after compilation.
    • never - Never apply the changes.
  • java.debug.settings.enableHotCodeReplace: Enable hot code replace for Java code. Make sure the auto build is not disabled for VS Code Java. See the Hot Code Replace wiki page for more information about usages and limitations.
  • java.debug.settings.enableRunDebugCodeLens: Enable the CodeLens provider for the run and debug buttons over main entry points, defaults to true.
  • java.debug.settings.forceBuildBeforeLaunch: Force building the workspace before launching java program, defaults to true.
  • java.debug.settings.console: The specified console to launch a Java program, defaults to integratedTerminal. If you want to customize the console for a specific debug session, please modify the console configuration in launch.json.
    • internalConsole - VS Code debug console (input stream not supported).
    • integratedTerminal - VS Code Integrated Terminal.
    • externalTerminal - External terminal that can be configured in user settings.

Troubleshooting

If you encounter issues when using the debugger, a detailed troubleshooting guide can be found in the vscode-java-debug GitHub repository.

Common issues explained include:

  • Java Language Support extension fails to start.
  • Build failed, do you want to continue?
  • *.java isn't on the classpath. Only syntax errors will be reported.
  • Program Error: Could not find or load main class X.
  • Program throws ClassNotFoundException.
  • Failed to complete hot code replace.
  • Please specify the host name and the port of the remote debuggee in the launch.json.
  • Failed to evaluate. Reason: Cannot evaluate because the thread is resumed.
  • Cannot find a class with the main method.
  • No delegateCommandHandler for vscode.java.startDebugSession when starting Debugger.
  • Failed to resolve classpath.
  • Request type 'X' is not supported. Only 'launch' and 'attach' are supported.

Visual Studio Code Size Of Tab

Feedback and questions

You can find the full list of issues at Issue Tracker. You can submit a bug or feature suggestion and participate in the community driven vscode-java-debug Gitter channel.

Next steps

Read on to find out about:

Visual Studio C# Examples

  • Debugging - Find out how to use the debugger in VS Code with your project for any language.

And for Java:

Visual Studio Code Tutorial

  • Java Testing - Test Java within VS Code with the Java Test Runner extension.
  • Java Extensions - Learn about more useful Java extensions for VS Code.