Учебник. создание консольного приложения .net в visual studio code

Preview Features

TypeScript 4.4 support

This release includes initial support for the upcoming TypeScript 4.4 release. You can read more about the new language features and improvements in TypeScript 4.4 on the TypeScript blog.

To start using the TypeScript 4.4 nightly builds, install the TypeScript Nightly extension.

Please share your feedback and let us know if you run into any bugs with TypeScript 4.4.

Move terminals between windows

It’s now possible to move terminals between windows by detaching via Terminal: Detach Session in one window and attaching to another with Terminal: Attach to Session. In the future, this should help enable cross-window drag and drop!

Debugging

Logpoint improvements

Logpoints were introduced in the last release and we’ve improved their ease of use and usefulness:

  • IntelliSense (smart completion) has been added for expressions embedded in log messages and conditional breakpoints.

  • When using Logpoints in Node.js debugging, structured objects embedded in the log message appear as expandable object in the Debug Console:

  • Logpoints in Node.js debugging now show their source location in the Debug Console:

  • Since Logpoints and breakpoints can be easily deleted by clicking on their icon in the editor’s gutter, you can accidentally lose a log message or a breakpoint condition. To prevent this, VS Code now prompts when a breakpoint with a condition or log message is deleted by clicking in the gutter. The alert gives you the option to disable the breakpoint instead of deleting it.

  • Last but not least, we’ve added a New Breakpoint > Logpoint… action to the Debug menu.

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 :

  • Gordon Mckeown(@gmckeown): Improved rendering of Seti icons #22667
  • @admosity: Fix typo in inspectKeybindings.ts PR #25262
  • Brian Schlenker (@bschlenk): Add noValuePreselect option to showInputBox PR #23827
  • Burak Can (@burakcan): Suggestion widget: Fix overflowing text problem (fixes #20679) PR #20857
  • Christopher Leidigh (@cleidigh)

    • Scm css fix for keyboard navigation and actions Issue PR #23967
    • Monokai UI theme — first pass for #25327 PR #25599
  • Dick van den Brink (@DickvdBrink): Fixed typo in terminal.contribution description PR #23784
  • David Hewson (@dten): OK capitalisation fix PR #25005
  • Eric Amodio (@eamodio): Adds editor options overloads to showTextDocument & vscode.diff PR #23641
  • Elias Winberg (@elias-winberg): Remove class snippet comment PR #23209
  • William Esz (@flagello)

    • Escape paths in npm.sh to fix #20907 PR #21010
    • Escape paths in code.sh PR #21016
  • @gauss1314: Update typescriptMain.ts PR #24892
  • Vakhurin Sergey (@igelbox): Added support for encodings for Git. PR #24911
  • Ilie Halip (@ihalip): Small comment fix PR #25558
  • Yuki Ueda (@Ikuyadeu): fix Solarized Light theme highlighting #24040 PR #24292
  • Jordan Menard (@jordanmkasla2009)

    • Open vscode://file/path/to/project/ URLs properly on Windows — fixes #20290 PR #20469
    • Implement #12910 PR #20881
  • Jakub Synowiec (@jsynowiec): Add an option to enable/disable JSDoc autocomplete PR #23704
  • Dominic Valenciana (@Kiricon)

    • Added missing . to hc-black so that it displays the correct scm actio… PR #24385
    • Changed git renamed icon to orange color PR #24567
    • Nested code lines now no longer display the hover border left. PR #24686
  • Phawin Khongkhasawan (@lifez): Add zenMode.hideActivityBar option PR #24499
  • Magnus Hiie (@magnushiie): Expose insert..Braces rule in VS Code settings PR #21649
  • Marek Lewandowski (@mlewand): Added support for home/end key in IntelliSense PR #20156
  • Peter Juras (@peterjuras): Remove «JOAO» from Readme title PR #24491
  • @QwertyZW: Let the widgetactions debug UI reflect the state of a focused thread PR #23878
  • Rishii7 (@rishii7)

    • Fix #24240 PR #24371
    • Fix #24817 — Prevent overflow of the message in define keybinding widget. PR #24925
  • Rômulo Guimarães (@romulo1984): Update Exec param at code.desktop PR #24523
  • Seivan Heidari (@seivan): Fixes #4803: Adding support for swipe gestures on macOS. PR #23663
  • Tereza Tomcova (@the-ress): Fixes #13905: Set relaunch command for window PR #15407
  • Thomas Rayner (@ThmsRynr): Fix #24971. PowerShell Extension .bat & .exe Syntax Highlighting Error PR #24973
  • Naveen Kumar (@timbanaveen)

    • Adding ‘never show again’ in Git Extension PR #24654
    • Adding line and column support for terminal PR #24832

Contributions to :

  • Damien Guard (@damieng): Correct log message heading in protocol v1 PR 186
  • Lucian Wischik (@ljw1004): Change «utf8» to «utf-8» with a hyphen PR 199
  • cxxxr (@cxxxr): small corrections PR 205
  • Vlad Dumitrescu (@vladdu): small corrections PR 207

Contributions to :

  • Cam (@trixnz): Add return value to getEnvironment(). PR #189
  • Guillaume Martres (@smarter): Fix a single typo PR #196
  • Hyo Jeong (@asiandrummer): fix typo PR #200

Contributions to

  • Dominic Valenciana (@Kiricon): Added @error support for sass PR #24
  • Ryan O’Connor (@rocifier): added unit tests for real selector formatter and fixed indentation PR #26

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.

TypeScript 3.7-beta support

Although VS Code will not bundle TypeScript 3.7 until its official release, we have already been working to support all the exciting new TypeScript 3.7-beta features.

These include:

  • Syntax highlighting of optional chaining and nullish coalescing in JavaScript and TypeScript files.
  • Completion support for optional chaining.
  • Control over semicolons with the new and settings.

You can easily try all these new TypeScript 3.7 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.7 beta!

Engineering

WinJS-Promise removal

When VS Code started, JavaScript wasn’t what it is today. For instance, there was no native promise and back then the team decided to use . Fast forwarding to today, the situation is different: native promises are real and is obsolete.

Because of that, we are in the progress of migrating away from . This is no easy undertaking because of differences in the API and the runtime behavior. We have started at around 10000 references to and are down to 1471, of which ~500 are instantiations and not plain type annotation. We are confident we will finish this epic journey soon!

Continued Electron 3.0 exploration

During this milestone, we continued to explore bundling Electron 3.0.0 into VS Code. This is a major Electron release and comes with Chrome 66 and Node.js 10.x (a major leap forward compared to our current version that has Chrome 61 and Node.js 8.x). We plan to push out the update to our Insiders users in December to gather additional feedback. If you are interested in helping out, make sure to install VS Code Insiders.

Community issue tracking

The community has helped us out periodically with issue tracking for a very long time. As we see more and more issues being filed (currently at an average of 70 per day), we have started to invite the community members that are most active to add specific labels to the issues they are working on. Since GitHub doesn’t have fine-grained permissions, we are using our issue bot to pick up on certain comments and add the labels for them. See the section below for acknowledgments.

Strict Null Checking

Our work to strict null check the main VS Code codebase has continued. We are now strict null checking around 800 files, and will continuing with this work until the entire codebase is covered.

You can track this engineering effort and learn more about the process issue #60565.

October Release Summary

Welcome to the October release of Visual Studio Code. There are a number of significant updates in this version that we hope you will like, some of the key highlights include:

  • — Organize your editors in either vertical or horizontal groups.
  • — New printable keyboard shortcuts PDF cheat sheet.
  • — Get rich auto completions for CSS embedded in your HTML.
  • — Set breakpoint hit count conditions.
  • — Easily configure your Node.js debugging sessions.
  • — You can now use these well-known keyboard shortcuts in VS Code.
  • — Quickly disable an Extension globally or for a specific workspace.
  • — The Dark+ themes now colorize variable and function references.
  • — View dependencies of an extension pack right in the extension details.

The release notes are arranged in the following sections related to VS Code focus areas. Here are some further updates:

  • — Some View states now persisted in user settings. Open multiple files from Quick Open.
  • — Keyboard shortcuts reference, finer formatting control.
  • — JavaScript and CSS improvements.
  • — New categories for Keymaps and Formatters for easier search.
  • — Multi-target debugging support, new debugging settings.
  • — Support for extension CHANGELOG.md files. Add to the editor tab context menu.

Documentation and extensions

New Remote Container topics

There are new topics for working with Containers in VS Code:

  • Attach to Container — Attach to an already running Docker Container.
  • Create a Dev Container — Create a custom container matching your development environment.
  • devcontainer.json reference — Control container creation through properties.

And check out this blog post on using Dev Containers in Education to help educators and students create stable, reproducible classroom setups.

Java lightweight mode

The Language Support for Java extension now supports a , for when you want to quickly work with your Java source files. You’ll still get powerful language features such as code completion, navigation, outlining, and syntax checking for your source code, as well as the JDK.

Editor

There are new snippet variables that insert line or block comments, honoring the current language. Use and for block comments and otherwise.

The snippet below inserts in JavaScript files and in HTML files

Declaration versus definition

Until now, VS Code offered commands for displaying the definition of a symbol, for example Go to Definition and Peek Definition. This didn’t take into account the fact that some languages differentiate, stricter than others, between the declaration and the definition of a symbol. We have fixed that and there are now commands Go to Declaration and Peek Declaration for the declaration of a symbol.

The data required for language features like Go to Declaration is computed by extensions and there is a new API, which you can read about in the section.

Engineering

Website refresh

We updated the Visual Studio Code website icons and colors to better match our brand. This is reflected throughout the website and documentation pages.

JavaScript minification via terser

We changed the minifier used for minification of JavaScript for the product build to be terser. Previously we had been using an older version of . The terser developers have been very helpful supporting us during the adoption.

Filewatcher update (Chokidar)

During this milestone, we updated our file watcher for macOS and Linux to version , which brings improved performance, reduced memory consumption, and a smaller package size. You can learn more from the Chokidar repo and Chokidar 3 blog post.

Integration tests run against the real build

Our product builds run a large integration test suite as part of the build. Previously, these tests were executing against VS Code running out of sources. Now, these tests use the built version of VS Code to verify that the build is ready to be released.

Image preview moved to a built-in extension

VS Code’s image preview functionality has been moved out of the core codebase and into a built-in Image Preview extension. The functionality of image previews should be almost exactly the same as before.

Extracting image preview into a built-in extension makes it easier to fix bugs and add features, and will eventually allow extensions to override VS Code’s built-in image preview more easily.

This change was enabled by the work we completed this iteration.

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.

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.

Tasks

Run on folder open

If you have a task that you always run when you open a folder, you can configure it to run automatically when that folder is opened by configuring its property. We found this useful for making sure no one breaks our new strict null checks in the VS Code repository. By adding , everyone who allows tasks to be run automatically will get markers when they violate the strict null check:

Rerun tasks

Tasks can now be rerun using the Tasks: Rerun Last Task command (). By default, a rerun task will re-evaluate its run variables, including its inputs. To use the variables that have already been evaluated in the previous run, configure the option:

Improved user input variables for task and debug configurations

For a long time VS Code has supported variable substitution in and via the syntax.

For , it was even possible to use variables that prompt for user input (for example which opens a Quick Pick based process picker). This feature was not available for and the command based variables had other limitations too (see issues #9297, #9544, and #30588).

In this milestone, user input variables have been generalized and improved and they are now available for and . This work has also brought the command syntax to .

For user input variables, we introduced a new variable category , which results in this syntax: . This simple syntax is not sufficient to present meaningful UI to the user, so we’ve introduced a new section in and , where additional configuration attributes are specified.

Example using Angular CLI:

Here is the list of supported attributes:

  • — The corresponding variable name for which these attributes are used.
  • — The type of user input widget. In this release, (for a string InputBox) and (for a string Quick Pick) are supported.
  • — Descriptive text shown to the user.
  • — The default value to use if the user just presses Enter.

A first example shows how to use a user input variable in a task configuration ():

Another example shows a user input variable for selecting between two options in a debug configuration ():

We plan to combine user input variables with the existing command-based variables so that user input variables can be contributed by extensions.

Debugging

Debug hover improvements

  • Language hover now available while debugging

    While debugging, the debug hover takes precedence over the language hover, making it impossible to see the language hover. Starting with this release, you can switch from the debug hover back to the language hover by holding down the modifier key. As long as is pressed, the language hover is shown instead of the debug hover. This makes it much easier to read Javadoc while debugging.

  • Auto sizing debug hover

    In order to minimize the need for scrolling, the debug hover width and height now automatically adapts to the size of the hover contents. This not only helps you the full strings, but you can also drill down into object structures, and the hover grows as needed.

Debug console filter improvements

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. We’ve added a badge to make it clear how many items are filtered away.

JavaScript debugging

Consolidated auto attach flows

Last month, we introduced as an experimental feature. This month, they have left the experimental state. The previous debug.autoAttach setting is deprecated in favor of the debug.javascript.autoAttachFilter option. The auto attach badge in the status bar now shows the current mode and allows you to toggle between modes.

Real-time performance view

The flame chart extension will now show a real-time view of performance metrics while debugging JavaScript code. CPU and memory usage are shown for Node.js programs and extension debugging. Debugging Chrome or Edge will additionally show metrics for DOM nodes, relayouts, and restyles.

Theme: Codesong

In addition to the controls in the view, there are a few settings you can use to control it:

  • debug.flameGraph.realtimePollInterval: how often stats are updated
  • debug.flameGraph.realtimeViewDuration: how much time should be displayed on the graph
  • debug.flameGraph.realtimeEasing: whether easing is enabled

Left-heavy flame chart view

Also new in the flame chart extension is a «left heavy» view, toggled by clicking the button in the upper-right corner of the chart.

This view groups call stacks and orders them by time, creating a visual representation of the «top down» table you might have used in other tools. This is especially useful if your profile has lots of thin call stacks (common with things like web servers) which are hard to get a sense of in the chronological view.

Here we have the same profile opened in the traditional chronological view on the right, and the left-heavy view on the left. With the left-heavy view, it’s much easier to tell exactly where time is being spent.

Theme: Codesong

Step through missing code

Previously if you tried to debug a file that has a sourcemap, but for which the source was not available, you would get stuck on a «could not load source» error and would be unable to view the compiled code. We now show a prompt allowing you to ignore the sourcemap and step through compiled code in these cases.

Theme: Codesong

Language Server Protocol

Work has started on the 3.17 version of the protocol. The first proposed feature is support for a more detailed completion item label.

Language Server Index Format

We also improved the LSIF indexer for TypeScript and tested it against a broader range of open-source repositories. Major improvements are:

  • A tolerant index mode that uses more memory but doesn’t fail if a symbol’s moniker is not correctly computed (see command-line option).
  • Log file support to help find situations where monikers can’t be correctly computed.
  • A new LSIF dump validation tool (lsif-tooling). The tools can be used with dumps produced by any tool. It is not constraint to the TypeScript indexer. The tool checks and LSIF dump for:
    • Correct vertex and edge layout (for example, correct properties and types of the properties)
    • That vertices are emitted before they are referenced in edges
    • The cardinality of edges
    • The outgoing and incoming type of edges.
    • The dump is portioned correctly (for example, no result partitions are added to documents / projects that are already closed)

Browser support

Download folders (Edge, Chrome)

Leveraging the new File System Access API, VS Code running in a browser can now offer a download action for folders from the File Explorer to download all files and folders to disk.

Note: This requires a recent version of Microsoft Edge or Google Chrome.

Open Workspace notification

If you open a folder that contains files at the top level, you’ll now see a notification asking you to open it. This was always the case in VS Code for desktop, and will now work in the browser too.

Prevent accidental close

A new setting was added to show a confirmation dialog before closing or leaving the workbench.

Possible values are:

  • The confirmation will only be shown when you use a keybinding to close (for example, ⌘W (Windows, Linux Alt+F4)). (default)
  • : The confirmation dialog will always be shown, even if you close from a mouse gesture.
  • : The confirmation will never be shown.

Note: This setting may not cover all cases. Browsers may still decide to close a tab or window without confirmation.

Preview features

Search in open editors

This release comes with experimental support for searching in open editors, which has been a highly requested feature for some time. This feature is enabled by default in Insiders, and can be enabled with the setting in Stable.

Theme: GitHub Light Theme

TypeScript 4.2 support

This release continues to improve our support for the upcoming TypeScript 4.2 release. You can read more about the new language features and improvements in TypeScript 4.2 on the TypeScript blog. Here are some of the editor improvements it enables:

  • JS Doc templates now generate .
  • Deprecated DOM APIs are now marked as such.
  • A quick fix to declare missing functions.
  • Native support for semantic highlighting, instead of using a TypeScript service plugin.

To start using the TypeScript 4.2 nightly builds, just install the TypeScript Nightly extension. Please share your feedback and let us know if you run into any bugs with TypeScript 4.2.

New Find References to File command

If you are using TypeScript 4.2, you can also try the new Find References to File command for JavaScript and TypeScript to find all places where a file is being referenced.

You can trigger this command in a few different ways:

  • For the active file using TypeScript: Find File References command.
  • Right-click on an editor tab and select Find File References.
  • Right-click on a file in the File Explorer and select Find File References.

Improvements for non US standard keyboard layouts

VS Code dispatches key bindings based on keyboard codes. In and in all the UI, we used to render the key codes with the produced characters under the US standard keyboard layout. We received feedback that this was very confusing, therefore, we created a new Node.js module that is used in VS Code to render the key bindings using the system’s current keyboard layout.

For example, when using a French (France) keyboard layout is now rendered as Ctrl+*:

When editing , we now highlight misleading key bindings — those that are represented in the file with the character produced under the standard US keyboard layout, but which need pressing keys with different labels under the current system’s keyboard layout.

For example, here is how the rules look like when using a French (France) keyboard layout:

Finally, we added a new widget that helps input the key binding rule when editing . To launch the Define Keybinding widget, press ⌘K ⌘K (Windows, Linux Ctrl+K Ctrl+K). The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout. Once you’ve typed the key combination you want you can press Enter and a rule snippet will be inserted.

Extension authoring

Testing APIs

Last fall we began work on adding native support for running tests in VS Code, and this month the first set of testing-related APIs has been finalized. These APIs provide greater flexibility, better performance, and richer UX over what has been found previously in extensions. Check out the guide on writing testing extensions to dive in.

Theme: codesong

Existing users of the Test Explorer UI extension can get the native experience by setting to . However, the conversion is a reflection of the Test Explorer UI extension’s existing API, so some features like rich diff support are not included.

One of the first extensions to adopt the testing API was the Microsoft Java Test Runner included in the Extension Pack for Java.

Contribution point for New File menu

Extensions that provide a way to create a new file editor, for instance notebooks or custom editors, can now contribute commands to the new menu contribution point. This menu can be accessed from the New File… item on the Welcome page or in the File menu.

Rich Status bar hover

Rich hovers including links and icons are now supported on Status bar items .

  • If is true, you can use icons with the syntax.
  • If the is trusted, you can also add command links. Syntax: .

Object settings without additionalProperties

Object settings must have set to for an object to be supported in the Settings editor. Otherwise, the Settings editor will interpret the setting as a complex setting that can take on any shape, and direct the user to the settings JSON file.

Multiline string settings

To add support for a multiline string setting in the Settings editor, add as a key-value pair to the string setting. Changing a string setting to be multiline will cause the Settings editor to render the setting value in a multiline text area instead of a single-line input box.

We’ve added the following new icons to our codicon library:

Text Document change reason

When the event is fired, a new property on the event object indicates whether the text change was caused by an Undo or Redo operation.

Notable Changes

  • : Webview: apply window.zoomLevel too
  • : macOS Sierra: background artifacts
  • : New Uncaught Exception when starting an extension debugging session
  • : Compound debug configurations not shown after first breakpoint is hit
  • : stepping over breakpoint appears to resume execution fully, vs stepping
  • : Quickly blinking cursor in terminal if you open and quit external app
  • : Use ctrl key as the modifier to enable copy when drag and drop on Linux
  • : Support navigation of problems by keyboard similar to search results.

These are the closed bugs and these are the closed feature requests for the 1.12 update.

Contributions to Extensions

Our team maintains or contributes to a number of VS Code extensions. Most notably this month:

Vetur

During this milestone, the Vetur Vue.js extension started taking advantage of VS Code’s file watcher. As a result:

  • Vetur now consumes less CPU / memory usage.
  • The new file watching mechanism correctly updates TS/JS files imported in Vue files and provides precise completions.

Meanwhile, Vetur now has End-To-End test coverage and centralized file system access. These changes ensure Vetur’s stability and unblocks cross-file and cross-section language features, such as completion for CSS class names in Vue’s HTML template or HTML template interpolation.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector