Tải visual studio 2023
September 2022 (version 1.72)Downloads: Windows: User System ARM | Mac: Universal 64 bit Arm64 | Linux: deb rpm tarball ARM snap Show
Update 1.72.1: The update addresses these security issues. Update 1.72.2: The update addresses these issues. Welcome to the September 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include:
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. WorkbenchHide actions from tool barsYou can now hide actions from tool bars. Right-click on any action in a tool bar and select its hide command or any of the toggle commands. Hidden actions are moved to the In the video below, the GitLens extension File Annotations menu is hidden from the editor tool bar and then restored via Reset Menu. Sorry, your browser doesn't support HTML 5 video.Merge editorOpt in to use the 3-way merge editorAfter reviewing all the merge editor feedback we received and thinking about the
experience as a whole, we decided to not show the 3-way merge editor by default (the For files with conflicts, users can now select Resolve in Merge Editor to open the 3-way merge editor: CodeLens UIUser feedback indicated that checkboxes had some UX problems. The checkboxes weren't very discoverable and they caused confusion by not properly representing all possible states. This iteration, we switched to CodeLens UI that uses textual labels (Accept Incoming, Accept Current, Accept Both): We will keep iterating on this design and closely monitor all the feedback we get. Result file recomputed from scratchIn the last iteration, we tried to design the merge editor as an alternative view of a file with conflicts. Instead of showing conflict markers, separate editor panes showed details of the conflict. This design had the advantage that opening the merge editor would not modify the file on disk and user changes made before opening the merge editor could be kept. Unfortunately, this was not only confusing, but also didn't work in all cases, as our merge algorithm and the Git merge algorithm didn't align perfectly. With this release, if a file with conflict markers is opened in the merge editor, as a first step, we use our merge algorithm to recompute the result file, without inserting any conflict markers. One-sided conflicts are resolved automatically and proper conflicts are reset to the common ancestor of both versions and marked as unhandled. Base viewThe merge editor now has a separate base view that can be used to compare any side with the common ancestor. Tree view Find control improvementsYou can now move the tree view Find control vertically, in order to access the UI elements behind it. Press ⌘F (Windows, Linux Ctrl+F) inside tree views to display the Find control. Additionally, the tree view Find control will remember the last search term when reopened. Built-in preview for some audio and video filesVS Code now supports previewing some audio and video file formats: The following audio formats are currently supported:
And the following video formats can be previewed:
For video files, keep in mind that both the video and audio track's media formats must be supported. Many Disable incremental namingYou can now disable incremental file naming in the File Explorer with the new Warning when editing inside VS Code application folderWhen editing files inside the VS Code application folder, a warning is now shown in the editor. Accidentally modifying files in the application folder is a common mistake and not usually what someone intended. EditorImproved autoscroll behaviorWhen selecting and dragging, the editor used to scroll in a way that was dependent on the display's frames per second (FPS), sometime making the editor scroll quickly as soon as the mouse reached the editor edges. Now, the editor autoscrolls at a more manageable speed of about one viewport per second when the mouse is close to the edges, and faster when the mouse is further from the editor, independent of the FPS. In the video below, the scroll rate increases as the mouse cursor moves down away from the editor. Sorry, your browser doesn't support HTML 5 video.Improved hoverThe
editor hover used to be very aggressive in hiding itself, especially when the mouse was going over an empty area of the editor. This made it difficult to reach some of the actions shown in the hover. Now, the hover will stay visible as long as the mouse is moving towards it. The setting In the "After" video on the right, it is much easier to select a Quick Fix from the hover:
New Code Action groupsThere are two new groups available in the Code Action control, These groups correspond to that New Code Action colorsYou may
notice that the Code Action control also looks a little different this iteration. The styling was updated to use more appropriate theme colors. The biggest change is that the control body now uses We are still refining these colors, so let us know if they don't work well with a given theme or if any color customization options are missing. ExtensionsRecently updated extensionsVS Code now shows extensions updated during the last 7 days in a Recently Updated section of Updates in the Extensions view. Extensions requiring attentionVS Code now shows extensions requiring attention sorted to the top of the default Installed section of the Extensions view. This includes extensions that have a pending update or have been updated or disabled and require VS Code to reload. The badge on the Extensions icon in the Activity Bar now shows the number of extensions requiring attention. Ignore updates for an extensionYou can now ignore updates for an extension by clicking the Ignore Updates button in the Update dropdown menu. This will remove the extension from the extensions requiring attention list. You can undo this action by unchecking the same Ignore Updates button. Note that installing a specific version of an extension (via Install Another Version) will also ignore updates for that extension. Sorting of installed extensionsYou can now sort the list of installed extensions by Install Count, Rating, Name, Published Date, and Updated Date. SearchResults displayed as a tree viewYou can now view search results in a tree! Just toggle between the list and tree view by clicking on the list/tree icon in the top corner of the Search view. Theme: Night Owl Light (preview on vscode.dev) File decoration settingsIn search results,
the filename badges and colors that reflect file statuses can now be toggled on and off. The settings are Search > Decorations: Badges ( Theme: Night Owl Light (preview on vscode.dev) Source ControlDiscover nested Git repositoriesTo address a long standing feature request, this milestone we made
changes to repository discovery to add support for nested Git repositories. Depending on the location of the nested repositories, you may need to modify the Add support for SSH keys with a passphraseWhen an SSH key with a passphrase is used for Git operations, VS Code will now display the quick input control so that you can enter the passphrase for the SSH key. The passphrase is not cached and has to be entered every time a Git operation is performed. Pull before checkoutThis milestone we added a new setting, Repository fetch improvementsFor Git repositories with multiple remotes, invoking the fetch command will now display a Quick Pick with the list of all remotes. Users can pick a particular remote to be fetched or to fetch from all remotes. Abort merge commandThere is a new command, Git: Abort Merge, to abort a merge operation that is currently in progress. TerminalTerminal Quick FixesWe're starting to roll out a new feature powered by shell integration called Quick Fixes. This feature comes with audio cue support. Enable it with A Quick Fix is available when a command maps to a set of actions the user will likely take and can be activated via the same keybinding used in the editor Ctrl+. or Cmd+.. Here are the initial supported Quick Fixes: Git similar commandWhen a Git command is mistyped, the Quick Fix suggests the similar command. Git set upstreamWhen Git create PRWhen a branch is pushed for the first time to the remote, the Quick Fix suggests opening the link to create a PR. Free portWhen a server is launched using a port that is already in use, the Quick Fix offers an action to kill the process and free the port. Shell integration improvementsThe following improvements to shell integration were made:
Hyperlink supportHyperlinks sent from the application running in the terminal are now supported. These allow presenting a label that points to a URL and appear with a dashed underline: Here's an example of how you could write a link with a label "VS Code" that points to https://code.visualstudio.com:
Or more generally:
VT feature supportThis version brings support for these VT escape sequences:
Audio bellThe audio bell now works in the terminal and can be enabled via Terminal documentationThe Terminal documentation has been refactored and moved into its own table of contents on the VS Code website. There are now topics specific to:
Hopefully you'll be able to easily find the right documentation when you need it. TasksPin run task entriesTasks can be pinned in the Tasks: Run Task list for faster and easier access. Task completion soundTasks play a sound when they finish to enable multi-tasking and improve accessibility. Configure the audio cue via the LanguagesMarkdown link validationWhile working with Markdown, it's easy to mistakenly
add an invalid file link or image reference. Perhaps you forgot that the filename used a To get started, set VS Code can even catch invalid links to specific headers in other Markdown files! There are a few settings you can use to customize link validation:
Give it a try and let us know what you think of the new feature! Reference links make it easy to use the same link multiple times in your Markdown source:
This is convenient as you can update both links just by changing one place in your file. The new Extract to link definition refactoring helps you convert an existing Markdown link into a link definition and reference link. This refactoring will convert all occurrences of a link in the current document. For example, for the Markdown document:
Running Extract to link definition on either of the
After running the refactoring, VS Code will prompt you for the link definition's name. In the above example, we entered Organize link definitions in MarkdownThe new Organize link definitions Code Action ( For example, in the Markdown source:
Running Organize link definitions will
Notice how the unused CSS / LESS / SCSSThe CSS language support now understands the @property and @layer at-rules. NotebooksNotebook JavaScript output is now evaluated as a moduleJavaScript output in notebooks is now treated as a module. This means that variables declared inside the output will no longer leak into other outputs (and in the case of This also means you can now use
HTML headers in Markdown cells can now be detected and rendered in the notebook Outline view. VS Code for the Web'code' in your browser omniboxThere is now a Chrome/Edge browser extension that makes it easier to open your GitHub repositories in vscode.dev. To get started:
In the video below, the user opens the This extension is inspired with many thanks by the Goto GitHub Repo Chrome extension, which was created by Pine Wu, a former VS Code team member. Take your changes with you when switching development environmentsWhen you are browsing a GitHub or Azure Repos repository such as https://vscode.dev/github/microsoft/vscode, you can use the Continue Working On command to select a different development environment to use with your repository. Previously, if you had uncommitted changes in your virtual workspace, you would need to push them to GitHub or Azure Repos to view them elsewhere. This milestone, we have added Edit Sessions integration to the Continue Working On feature, so that your uncommitted changes automatically travel with you to your target development environment, such as a GitHub codespace: In the video below, the user's changes to a JavaScript file that were made when using VS Code for the Web are applied when they create and switch to working in a new GitHub codespace. Sorry, your browser doesn't support HTML 5 video.With this release, the first time that you use Continue Working On with uncommitted changes, you will have the option to bring your edits to your selected development environment using Edit
Sessions, which uses a VS Code service to store your pending changes. These changes are deleted from our service once they are applied to your target development environment. If you choose to continue without your uncommitted changes, you can always change this preference later by configuring the When you are using VS Code for the Web, your uncommitted changes will then travel with you when you use Continue Working On in:
When you are using desktop VS Code with the Remote Repositories extension, your uncommitted changes will travel with you when you use Continue Working On in:
Issue ReportingIncreased threshold for issues to 7500 charactersWhen using the built-in issue reporter to report a problem with VS Code or an extension, there is a limit on the number of characters in the URL used to open the issue on github.com. If you hit this limit, you will see a message in the issue body that says
This milestone, we have increased the threshold to 7500 characters. This is because:
This nearly triples the number of characters included in the URL, which should be sufficient for most users and the clipboard message will be displayed less often. Issue Reporter used with Running Extensions editorIf you open the Running Extensions editor using the command Developer: Show Running Extensions and select the Report Issue button, it will display the built-in issue reporter. Before, this would take you to a GitHub issue and ask you to paste, and it created a lot of unnecessary and poor quality issues in extension repositories. The extensions Report Issue button now goes through the built-in issue reporter and will let users submit quality extension issues. Contributions to extensionsRemote DevelopmentThe Remote Development extensions allow you to use a development container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. We've heard your feedback about the naming of the Remote - WSL and Remote - Containers extensions. We intended for Thus, we've updated naming and in-product commands in these extensions to be clearer, renaming them to the WSL and Dev Containers. Links such as the extension identifier in the Marketplace and documentation remain the same, so you shouldn't see breakage in your current use of these two extensions. Along with the rename, work continued on features and fixes of these extensions as well. You can learn more in the Remote Development release notes. Dev Container FeaturesDev Container Features let you easily add pre-packaged capabilities to your dev containers. Whether it is tools like Git or Docker or support for programming languages such as Go or Java, you can review the list of Available Features and add them to your GitHub Pull Requests and IssuesThere has been more progress on the GitHub Pull Requests and Issues extension, which allows you to work on, create, and manage pull requests and issues. Highlights of this release include:
Check out the changelog for the 0.52.0 release of the extension to see the other highlights. GitHub Issue NotebooksWorkspace editsThe GitHub Issue Notebooks extension showcases the notebook API and also turned out to be pretty handy. In this spirit, we adopted the latest improvements of the workspace edit API. There are new Code Actions that:
LocalizationThe extension is now fully localized in the 13 languages that VS Code supports. It's also the first extension to be localized using the new Localization API, which means that localization works on desktop and the web. JupyterCell tags and slideshow editing supportWe can now edit cell tags and slideshow types directly in notebook editor without opening the JSON format of the document. This allows us to parameterize the notebooks for papermill or customize notebooks for nbconvert. We can now also update notebook cells' slide show type directly through commands to turn the notebooks into slides for presentation. Both examples above are using the notebook workspace edit API to edit cell metadata. If you are interested in how to support editing other custom cell metadata, you can learn more from the GitHub repositories (cell-tags, slideshow). Improved command interaction for the Interactive WindowThe Notebook Delete cell commands are enabled for Interactive Window cells, and can now be undone. Python file cell folding"Cells" within a Python file denoted with GitHub Enterprise Server authentication supportBefore now, GitHub Enterprise Server users had to manually create a personal access token (PAT) in order to log in to GitHub Enterprise Server in VS Code (for example, to use with the GitHub Pull Requests and Issues extension). This was a cumbersome process that required users to leave VS Code to create a PAT, make sure they've created it with the right permissions, copy it, and paste it back into VS Code. No more. Now, the GitHub Enterprise Server login flow is identical to the github.com login flow, and users can log in to GitHub Enterprise Server without needing to create a PAT. To see this experience in action, you can get the
GitHub Pull Requests and Issues extension from the Marketplace, set the Theme: Panda Theme (preview on vscode.dev) PythonCreate Environment commandA new Create Environment command has been added that will automatically create a virtual environment or conda environment for Python users in VS Code. Users will be able to trigger the command through the Command Palette, select whether they want to create a new virtual environment with venv
or a Conda environment, and finally select their desired interpreter for their project. The command will also install necessary packages outlined in a New environments API for extension authorsThe Python API now provides a way for extensions to work with Python environments available in the user's machine as found by the Python extension. Extensions can also use it to access the selected environment path that's used by the Python extension to run scripts, or update it to their preferred one. Feel free to provide your feedback in issue #18888. Note the API is still not finalized yet, so may still change without providing backwards compatibility based on the feedback. Python extension templateThe Python extension template helps you build a Visual Studio Code extension for your favorite Python tool, such as linters, formatters, or code analysis utilities. The template gives you the basic building blocks you need to build an extension that integrates your tool into VS Code. Preview featuresSettings ProfilesWe have been working the last couple of months to support Settings Profiles in VS Code, which is one of the most popular asks from the community. This feature is available for preview via the Settings Profiles indicatorVS Code shows a Settings Profiles indicator at the bottom of the Activity bar. By default, the first two characters of the profile name are shown in the indicator. You can also customize the short name to any two characters or an emoji or a codicon. A codicon can be referenced by using the A menu is shown when you click on this indicator with a Change Short Name option. Syncing Settings ProfilesVS Code now supports syncing Settings Profiles across your VS Code instances. Note: This feature is currently available only in the Insiders release of VS Code. WebAssembly and Python execution in the WebIn the last couple of month, we worked on bringing WebAssembly (WASM) to VS Code. To enable support, we worked on two things:
The screenshot below shows running a You can also start a Python REPL using the command Python WASM: Start REPL. Please note that both the libraries and the extension are under development and provided as previews. There are limitations in the WebAssembly Python interpreter as well as in VS Code itself. Major limitations in the interpreter are:
However there is support to create your own Python environment, including source wheel Python packages. Check out the extension's README for details. Limitations in VS Code are:
But stay tuned. We have things in the pipeline to lift some of these limitations. Extension debugging in a clean environmentWhen debugging an extension, there was always the problem that the extension was running in the development environment (user settings and installed extensions) of the author of the extension and not in an environment that was more appropriate for the target user of the extension. With the recently introduced "profiles" feature, it is now possible to run the extension under development in a different environment by specifying a profile in the extension's debug configuration. Two scenarios are supported:
This debug configuration shows how to debug in a clean environment with the
And here is a debug configuration for debugging in a controlled environment that uses a previously created profile named "extensionContext":
Note that when debugging an extension in a remote location (via the Remote Development extensions Dev Containers, SSH, or WSL), using the This is expected because the temporary profile does not include any extensions, which means that the Remote Development extensions are missing too. For remote scenarios, it is recommended that you create an empty named profile, add the Remote Development extensions to it, and then use the Improved workspace editing APIsEditing notebooks with WorkspaceEditWorkspace edits can now modify notebooks with
Performing snippet edits with WorkspaceEditThe new Note that snippet edits require a code or notebook editor and can only support snippet edits for a single editor, otherwise they behave like regular text edits. We believe that combining snippet edits and workspace edits allow for new and more seamless Code Actions and refactorings, like the sample from the GitHub Issue Notebooks extension below. Sorry, your browser doesn't support HTML 5 video.Creating files with contents with WorkspaceEditYou can now specify contents when creating files using
The new webview context menu API makes it easy for advanced webviews to customize the context menu that shows when a user right-clicks inside a webview. This new contribution point uses VS Code's normal context menus, so custom menus fit right in with the rest of the editor. Webviews can also show custom context menus for different sections of the webview. To add a new context menu item to your webview, first add a new entry in
Inside of the webview, you can also set the contexts for specific areas of the HTML using the Consider this HTML for example:
If the user right-clicks on the
If the user right-clicks inside of the New theme variable for active theme in webviewsThe
new
If you were using Async notebook renderersThe
notebook renderer API now better supports asynchronous notebook renderers. While this was implicitly supported previously, now
If your renderer performs any asynchronous work, please adopt these API updates so VS Code can better support your renderer. Refactor.move Code Action kindThe new While extensions could previously create Code Actions of
the kind Selected tree items passed to view/title actionsCommands contributed to Tree view initialSize contribution finalizedExtensions that contribute views in There are some restrictions on when
Tree viewBadge finalized
Unbound breakpoint warning iconDebug extensions can now define a hint message when there is an active debug session with unbound breakpoints. It will appear in the header of the Breakpoints view and also when hovering the gray breakpoint icon in the editor.
Here's an example of how it's used in the This message can be declared in the new
There is now a VS Code Community Discussions site for extension authors as a gathering place to ask questions, connect with other developers, and show off great work. There you can find announcements related to the VS Code APIs, post questions or search for existing answers, and check out the Extension Show and Tell. Proposed APIsEvery milestone comes with new proposed APIs and extension authors can try them out. As always, we want your feedback. Here are the steps to try out a proposed API:
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. Extensible JavaScript notebook rendererOur built-in
notebook renderers now expose an experimental API that lets extensions customize rendering of JavaScript content. This API currently exposes a single hook, To try using this experimental API, your extension needs to extend the vscode.builtin-renderer API.
Your renderer can then register a rendering hook on the
Test out this new API and let us know what you think! Event for env.shell changesThe new event
Tree item checkboxesThe proposed
Localization as part of the APIThis iteration we are introducing a new API to help extensions localize strings. This replaces the previous Localization for VS Code extensions has four important parts: The new vscode.l10n API
The vscode.l10n proposed API is a new namespace and provides a single function A simple example of using the new API:
In this example, the string The
The The @vscode/l10n-dev moduleThe @vscode/l10n-dev module is a new module that is used to generate the localization
bundles. You can either use it as a command line tool or as a library. Both are used to generate the localization bundles by scanning for Here's a simple example of using the command line tool:
This will place a
If you
wanted to support French, you would create this in a
The The @vscode/l10n moduleSince the
The idea is that your extension-side code, which is responsible for spinning up the subprocesses, will use the The package.nls.json fileNothing has changed with respect to the Your
Your
Your
SummaryThere's certainly a lot here to digest, but hopefully this gives you an idea of the direction we're taking with localization in VS Code extensions. If you're interested in a full example, you can check out the l10n-sample. If you have questions or feedback, you can let us know in the following places:
Log output channelThe
The
The log output channels created by extensions are shown as separate entries in the Output dropdown view. Messages written to this log output channel are represented in the same format as the VS Code log messages. EngineeringTowards "cross origin isolation"We have made changes to enable cross origin isolation for VS Code desktop and vscode.dev. This will enable new powerful features like shared array buffers. Both VS Code itself and also extensions and webviews will benefit from this. Cross origin isolation is currently behind a feature flag and enabling it might have unwanted effects on extensions and webviews that load resources from the internet. You can read more about this in Why you need "cross-origin isolated" for powerful features. We would like to hear your feedback early. To try this:
To check that cross origin isolation is enabled use the Application-tab of Dev Tools or check the value of the crossOriginIsolated global variable. Improved startup performanceWe reserved engineering time this milestone to improve the startup time it takes from launching VS Code to seeing a blinking cursor in the text editor. We always keep track of our performance numbers and noticed a slight degradation at the end of last milestone that we wanted to address. This was a team effort where everyone was contributing various changes throughout the source code. A couple of highlights are mentioned here. No more sync fs callsWe typically avoid the synchronous variants of the Node.js More bundling of main entry pointsOur main bundles that make up the VS Code application are several megabytes in size, bundled as single file using vscode-loader and minified using esbuild. However in some cases, we did not invest in bundling, specifically for:
Bundling in these two areas allows us to reduce the cost of looking up JavaScript files on startup to just one call for the Electron main process and one call for the window itself. Pushing code to a later phaseThe best performance fix is to remove code and never run it, but that is obviously not a solution that is scalable. An alternative is to delay the execution of code to a later phase, for example after the text editor has opened. In this milestone, we again reviewed our various components and pushed some of them to a later phase to not block the critical startup path. Document internal toolsTo analyze performance, we make heavy use of browser's Dev Tools and OS inspection tools. However, we also have some tools that are baked into VS Code. We documented the custom tools in Perf Tools for VS Code Development so that more people can benefit from them. Faster PR checksFor pull requests, we run automatic unit, integration, and smoke testing. All this happens in parallel but each step requires that our TypeScript sources are transpiled into JavaScript code. Originally, we used the TypeScript compiler for this. It emits JavaScript but also does type checking. The latter is time consuming and for testing not really needed. The overall time cost, by which testing was delayed, was around 5 minutes. We then switched to a custom transpile-only solution that uses the TypeScript compiler API. This was much faster but still took around 2 minutes. In this milestone, we switched to SWC (Speedy Web Compiler), which is even faster. It now takes around 12 seconds to transpile all our TypeScript sources. This is a huge improvement and allows us to get feedback on pull requests much faster. Notable fixes
Thank youLast but certainly not least, a big Thank You to the contributors of VS Code. Issue trackingContributions to our issue tracking:
Pull requestsContributions to
Contributions to
Contributions
to
Contributions to
|