VS code Development Debugging. NET Core 2.0

Source: Internet
Author: User
Tags dotnet windows x64

VS code Development Debugging. NET Core 2.0

Use vs Code to develop debugging. NET Core 2.0 from scratch. You can develop Debug. NET Core 2.0 applications without installing vs 2017 15.3+.

VS Code Full name is Visual Studio code,visual Studio Code is a lightweight cross-platform Web integration development environment that can run under LINUX,MAC and Windows!

This article is for the VS Code development Debug. NET Core 2.0 Tutorial, do the actual work under Windows, but the same applies to other systems.

Environment installation

This article demonstrates the development environment: WIN10 x64 Visual Studio Code 1.15.1

. NET Core SDK 2.0 Windows x64 Installer:

Https://aka.ms/dotnet-sdk-2.0.0-win-gs-x64

If you have installed a previous version of the SDK, it is recommended that you uninstall and install it first.

More system version Download:

Https://www.microsoft.com/net/download/core

Vscode:

https://code.visualstudio.com/

Vscode C # Plugins:

Open Extended Search C # and select C # installation.

Reboot vs Code after installing the plugin.

Create a project

First make sure that the. NET Core SDK is installed successfully.

Dotnet--version

The output is as follows:

2.0.0

You can then create the project.

dotnet New Console

Dotnet Run

The entire command execution is complete. NET Core 2.0 SDK dotnet restore is performed by default.

Using VS Code Development

Open the core2.0 folder with VS Code, open the Program.cs file

If this is the first time you need to wait patiently for the plug-in installation. Successful installation such as:

Then wait a little bit and it will appear as shown.

Select Yes. The plugin will automatically configure the Launch.json for us.

Then we can switch to the Debug window to debug, click the Debug button

The next breakpoint was successfully broken.

F10 single-Step F11 single-Step debugging F5 execution.

You can also choose additional debugging, as follows:

The code joins ReadKey () and then the terminal dotnet run

Then click the Debug button and select Dotnet exec

Then the terminal input any key can continue, the program can also go through debugging.

can be very convenient to write code, plug-ins to provide us with smart tips. This allows you to develop. NET Core 2.0 without installing vs 2017 15.3+.

A nuget plug-in NuGet package Manager is recommended here to add packages easily. such as:

VS code Development Debugging. NET Core 2.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.