Visual Studio 통합 개발 환경은 코드를 편집, 디버그 및 빌드한 다음, 앱을 게시하는 데 사용할 수 있는 창의적인 실행 패드입니다.IDE(통합 개발 환경)는 소프트웨어 개발의 다양한 측면에서 사용할 수 있는 다양한 기능을 갖춘 프로그램입니다. Visual Studio는 대부분의 IDE가 제공하는 표준 편집기 및 디버거로서 뿐만 아니라, 컴파일러와 코드 완성 도구, 그래픽 디자이너를 비롯해 소프트웨어 개발 프로세스를 쉽게 만들어 주는 많은 기능을 포함하고 있습니다.

이 이미지는 프로젝트와 사용할 만한 몇 가지 주요 도구 창이 열려 있는 Visual Studio를 보여줍니다.

  • 솔루션 탐색기(오른쪽 위) - 코드 파일을 보고, 탐색하고, 관리할 수 있습니다. 솔루션 탐색기에서 파일을 솔루션 및 프로젝트로 그룹화하여 코드를 구성할 수 있습니다.

  • 편집기 창(가운데) - 대부분 작업을 수행하는 곳으로 파일 콘텐츠가 표시됩니다. 코드를 편집하거나 단추 및 텍스트 상자를 사용하여 창과 같은 사용자 인터페이스를 디자인할 수 있습니다.

버전

Visual Studio는 Windows 및 Mac에서 사용할 수 있습니다. Mac용 Visual Studio에는 Visual Studio 2019와 동일한 기능이 많이 있으며 플랫폼 간 앱 및 모바일 앱 개발에 최적화되어 있습니다. 이 문서에서는 Windows 버전의 Visual Studio 2019에 중점을 둡니다.

세 가지 Visual Studio 2019 버전은 다음과 같습니다. Community, Professional 및 Enterprise. 각 버전에서 지원되는 기능에 대해 알아보려면 Visual Studio IDE 비교를 참조하세요.

소프트웨어를 개발할 때 생산성을 높이는 데 도움이 되는 Visual Studio에서 인기 있는 기능 몇 가지는 다음과 같습니다.

  • 오류 표시선 및 빠른 작업

    오류 표시선은 물결 모양의 밑줄로, 입력할 때 코드의 오류 또는 잠재적인 문제를 알려줍니다. 이러한 시각적 단서를 사용하면 빌드하는 동안이나 프로그램을 실행할 때 오류가 검색될 때까지 기다리지 않고 즉시 문제를 해결할 수 있습니다. 오류 표시선 위로 마우스를 가져가면 오류에 대한 추가 정보가 표시됩니다. 오류를 수정하기 위한 작업(빠른 작업이라고 함)과 함께 전구가 왼쪽 여백에 나타날 수도 있습니다.

  • 코드 정리

    단추를 클릭하여 코드 형식을 지정하고 코드 스타일 설정, .editorconfig 규칙  Roslyn 분석기에서 제안하는 코드 수정 사항을 적용합니다. 코드 정리는 코드 검토로 이동하기 전에 코드의 문제를 해결하는 데 도움이 됩니다. (현재 C# 코드에만 사용할 수 있습니다.)

  • 리팩터링

    리팩터링에는 변수의 지능형 이름 바꾸기, 새 메서드로 코드 줄을 하나 이상 추출, 메서드 매개 변수의 순서 변경 등과 같은 작업이 포함됩니다.

  • IntelliSense

    IntelliSense는 편집기에서 직접 코드에 대한 정보를 표시하고 경우에 따라 약간의 코드를 작성하는 기능 집합에 대한 용어입니다.IntelliSense는 다른 곳에서 형식 정보를 조회할 필요가 없도록 기본 설명서를 편집기에 인라인으로 포함하는 것과 같습니다.IntelliSense 기능은 언어에 따라 달라집니다. 자세한 내용은 C# IntelliSense, Visual C++ IntelliSense, JavaScript IntelliSense  Visual Basic IntelliSense를 참조하세요. 다음 그림에서는 IntelliSense에서 형식에 대한 멤버 목록을 표시하는 방법을 보여 줍니다.

  • 검색 상자

    Visual Studio는 메뉴, 옵션 및 속성이 매우 다양하여 때때로 버거울 수도 있습니다. 검색 상자는 Visual Studio에서 필요한 항목을 빠르게 찾을 수 있는 좋은 방법입니다. 찾으려는 이름을 입력하기만 하면 Visual Studio는 원하는 곳으로 정확하게 안내하는 결과를 나열합니다. 예를 들어 다른 프로그래밍 언어를 위한 지원을 추가하도록 Visual Studio에 기능을 추가하는 경우 검색 상자를 사용하면 워크로드 또는 개별 구성 요소를 설치하도록 Visual Studio 설치 관리자가 열립니다.

     

    검색 상자에 대한 바로 가기는 Ctrl+Q를 누릅니다.

  • Live Share

    앱 유형 또는 프로그래밍 언어와 관계없이 다른 사람과 공동으로 실시간 편집 및 디버그를 수행할 수 있습니다. 프로젝트를 즉시 안전하게 공유하고, 필요에 따라 디버깅 세션, 터미널 인스턴스, localhost 웹앱, 음성 통화 등을 공유할 수 있습니다.

  • 호출 계층 구조

    호출 계층 구조 창은 선택한 메서드를 호출하는 방법을 보여 줍니다. 이는 메서드를 변경하거나 제거하려고 하거나 버그를 추적하려는 경우 유용한 정보가 됩니다.

  • CodeLens

    CodeLens를 사용하면 편집기 내에서 코드 참조, 코드 변경 내용, 연결된 버그, 작업 항목, 코드 검토 및 단위 테스트를 확인할 수 있습니다.

  • 정의로 이동

    정의로 이동 기능은 함수 또는 형식이 정의된 위치로 직접 이동합니다.

  • 정의 피킹(Peeking)

    정의 보기 창은 실제로 개별 파일을 열지 않고 메서드 또는 형식의 정의 보여 줍니다.

Visual Studio IDE 설치

이 섹션에서는 Visual Studio로 할 수 있는 몇 가지 작업을 시도해 볼 간단한 프로젝트를 만듭니다. 코딩 지원 기능인 IntelliSense를 사용하고, 앱을 디버그하여 프로그램을 실행하는 동안 변수 값이 표시되도록 하고, 색 테마를 변경합니다.

시작하려면 Visual Studio를 다운로드하여 시스템에 설치합니다. 모듈식 설치 관리자를 사용하면 선호하는 프로그래밍 언어 또는 플랫폼에 필요한 기능 그룹인 워크로드를 선택하여 설치할 수 있습니다. 프로그램 생성 단계를 수행하려면 설치 중에 .NET Core 플랫폼 간 개발 워크로드를 선택해야 합니다.

Visual Studio를 처음 열면 필요에 따라 Microsoft 계정이나 회사 또는 학교 계정으로 로그인할 수 있습니다.

프로그램 만들기

이제 본격적으로 간단한 프로그램을 만들어 보겠습니다.

  1. Visual Studio를 엽니다.

    리포지토리 복제, 최근 프로젝트 열기 또는 새 프로젝트 만들기에 대한 다양한 옵션이 포함되어 있는 시작 창이 표시됩니다.

  2. 새 프로젝트 만들기를 선택합니다.

    새 프로젝트 만들기 창이 열리고 여러 프로젝트 템플릿이 표시됩니다. 템플릿에는 지정된 프로젝트 형식에 필요한 기본 파일과 설정이 포함되어 있습니다.

  3. 원하는 템플릿을 찾으려면 검색 상자에 .net core console을 입력합니다. 입력한 키워드에 따라 사용 가능한 템플릿 목록이 자동으로 필터링됩니다. 언어 드롭다운 목록에서 C# 를 선택하여 추가로 템플릿 결과를 필터링할 수 있습니다. 콘솔 앱(.NET Core) 템플릿을 선택하고 다음을 선택합니다.

  4. 새 프로젝트 구성 창에서 프로젝트 이름 상자에 HelloWorld를 입력하고, 필요에 따라 프로젝트 파일의 디렉터리 위치를 변경한 다음, 만들기를 선택합니다.

    Visual Studio가 프로젝트를 만듭니다. 이 프로젝트는 Console.WriteLine() 메서드를 호출하여 리터럴 문자열 “Hello World!”를 표시하는 간단한 “Hello World” 애플리케이션입니다. 콘솔(프로그램 출력) 창에서

    잠시 후 다음과 같은 정보가 표시됩니다.

    애플리케이션의 C# 코드는 대부분의 공간을 차지하는 편집기 창에 표시됩니다. 텍스트는 지정된 색으로 자동으로 표시되어 다른 부분(예: 키워드 또는 형식)을 나타냅니다. 또한 코드에서 작은 세로 파선은 서로 일치하는 중괄호를 나타내며, 줄 번호는 나중에 코드를 찾는 데 도움이 됩니다. 작은 상자 안에 있는 빼기 기호를 선택하여 코드 블록을 축소하거나 확장할 수 있습니다. 이 코드 개요 기능을 사용하면 필요 없는 코드를 숨길 수 있으므로 화면 상의 혼란을 최소화할 수 있습니다. 프로젝트 파일은 솔루션 탐색기라는 창의 오른쪽에 나열됩니다.

    다른 메뉴와 도구 창을 사용할 수 있지만 지금은 넘어가겠습니다.

  5. 이제 앱을 시작합니다. 메뉴 모음의 디버그 메뉴에서 디버깅하지 않고 시작을 선택하면 됩니다. Ctrl+F5를 누를 수도 있습니다.

    Visual Studio에서 앱을 빌드하며, 콘솔 창이 열리고 Hello World! 메시지가 표시됩니다. 이제 실행 중인 앱이 있습니다!

  6. 콘솔 창을 닫으려면 키보드에서 아무 키나 누릅니다.

  7. 앱에 일부 코드를 추가하겠습니다. Console.WriteLine("Hello World!"); 줄 앞에 다음 C# 코드를 추가합니다.

    C#복사

    Console.WriteLine("\nWhat is your name?"); var name = Console.ReadLine();

    이 코드는 콘솔 창에 이름이 무엇입니까? 를 표시한 다음, 사용자가 텍스트를 입력한 후 Enter 키를 누를 때까지 기다립니다.

  8. Console.WriteLine("Hello World!");이라고 표시된 줄을 다음 코드로 변경합니다.

    C#복사

    Console.WriteLine($"\nHello {name}!");
  9. 디버그 > 디버깅 없이 시작을 선택하거나 Ctrl+F5를 눌러 앱을 다시 실행합니다.

    Visual Studio에서 앱을 다시 빌드하고, 콘솔 창이 열리며 사용자 이름을 묻는 메시지가 표시됩니다.

  10. 콘솔 창에 이름을 입력하고 Enter 키를 누릅니다.

  11. 아무 키나 눌러 콘솔 창을 닫고 실행 중인 프로그램을 중지합니다.

리팩터링 및 IntelliSense 사용

리팩터링  IntelliSense로 더 효율적으로 코딩하는 데 도움이 되는 몇 가지 방법을 살펴보겠습니다.

먼저 name 변수의 이름을 변경합니다.

  1. name 변수를 두 번 클릭하여 선택합니다.

  2. 변수의 새 이름 username을 입력합니다.

    변수 주위에 회색 상자가 나타나고 여백에 전구가 나타납니다.

  1. 전구 아이콘을 선택하여 사용 가능한 빠른 작업을 표시합니다. 'name'의 이름을 'username'으로 바꾸기를 선택합니다.

    프로젝트 전체에서 변수의 이름이 변경됩니다. 이 경우에는 두 군데밖에 없습니다.

  1. 이제 IntelliSense를 살펴보겠습니다. Console.WriteLine($"\nHello {username}!");이라고 표시된 줄 아래에 DateTime now = DateTime.을 입력합니다.

    상자에 DateTime 클래스의 멤버가 표시됩니다. 또한 현재 선택된 멤버의 설명이 별도 상자에 표시됩니다.

  2. 클래스의 속성인 Now라는 멤버를 두 번 클릭하거나 Tab 키를 눌러 선택합니다. 끝에 세미콜론을 추가하여 코드 줄을 완성합니다.

  3. 그 아래에 다음 코드 줄을 입력하거나 붙여넣습니다.

    C#복사

    int dayOfYear = now.DayOfYear; Console.Write("Day of year: "); Console.WriteLine(dayOfYear);

     

    Console.Write은 인쇄 후 줄 종결자를 추가하지 않는다는 점에서 Console.WriteLine과 약간 다릅니다. 즉, 출력으로 전송되는 다음 텍스트가 같은 줄에 인쇄됩니다. 코드에서 이러한 각 메서드 위로 마우스를 가져가면 설명을 볼 수 있습니다.

  4. 다음으로, 리팩터링을 다시 사용하여 코드를 좀 더 간결하게 만듭니다. DateTime now = DateTime.Now; 줄에서 변수 now를 클릭합니다.

    해당 줄의 여백에 작은 스크루드라이버 아이콘이 나타납니다.

  5. 스크루드라이버 아이콘을 클릭하면 Visual Studio에서 제안하는 사항을 볼 수 있습니다. 여기에는 코드의 전체 동작을 변경하지 않고 코드 줄을 제거할 수 있는 인라인 임시 변수 리팩터링이 표시되어 있습니다.

  6. 인라인 임시 변수를 클릭하여 코드를 리팩터링합니다.

  1. Ctrl+F5 키를 눌러 프로그램을 다시 실행합니다. 출력은 다음과 같습니다.

코드 디버그

코드를 작성할 때 코드를 실행하고 버그를 테스트해야 합니다. Visual Studio의 디버깅 시스템을 사용하면 코드를 단계별로 진행하면서 명령문을 한 번에 하나씩 실행하면서 변수를 검사할 수 있습니다. 특정 줄에서 코드의 실행을 중지하는 중단점을 설정할 수 있습니다.코드를 실행함에 따라 변수의 값이 변경되는 방법 등을 확인할 수 있습니다.

중단점을 설정하여 프로그램이 "이동 중"일 때 username 변수의 값을 확인하겠습니다.

  1. Console.WriteLine($"\nHello {username}!");이라고 표시된 코드 줄을 찾습니다. 이 코드 줄에 중단점을 설정하려면, 즉 이 줄에서 프로그램이 실행을 일시 중지하도록 하려면 편집기의 맨 왼쪽 여백을 클릭합니다. 코드 줄의 아무 곳이나 클릭한 다음, F9 키를 누를 수도 있습니다.

    맨 왼쪽 끝에 빨간색 원이 표시되고 코드가 빨간색으로 강조 표시됩니다.

  2. 디버그 > 디버깅 시작을 선택하거나 F5 키를 눌러 디버깅을 시작합니다.

  3. 콘솔 창이 나타나고 사용자 이름을 묻는 메시지가 표시되면 입력하고 Enter 키를 누릅니다.

    Visual Studio 코드 편집기로 포커스가 돌아오고 중단점이 있는 코드 줄이 노란색으로 강조 표시됩니다. 이는 프로그램이 실행할 다음 코드 줄을 의미합니다.

  4. 마우스를 username 변수 위로 가져가면 해당 값을 볼 수 있습니다. 또는 username을 마우스 오른쪽 단추로 클릭하고 조사식 추가를 선택하여 변수를 조사식 창에 추가할 수 있습니다. 이 창에서 해당 값을 볼 수도 있습니다.

  5. 프로그램 실행을 완료하려면 F5 키를 다시 누릅니다.

Visual Studio의 디버깅에 대한 자세한 내용은 디버거 기능 둘러보기를 참조하세요.

Visual Studio 사용자 지정

기본 색 테마 변경을 비롯하여 Visual Studio 사용자 인터페이스를 꾸밀 수 있습니다. 어둡게 테마로 변경하려면:

  1. 메뉴 모음에서 도구 > 옵션을 선택하여 옵션 대화 상자를 엽니다.
  1. 환경 > 일반 옵션 페이지에서 색 테마 선택을 어둡게로 변경하고 확인을 선택합니다.

    전체 IDE의 색 테마가 어둡게로 변경됩니다.

IDE를 개인 설정할 수 있는 다른 방법을 배우려면 Visual Studio 개인 설정을 참조하세요.

다음 단계

이러한 소개 아티클 중 하나와 함께 다음을 수행하여 Visual Studio를 추가로 탐색합니다.

자세한 코딩을 살펴보려는 경우 다음과 같은 언어별 빠른 시작 중 하나를 진행하는 것이 좋습니다.

참고 항목

The Visual Studio integrated development environment is a creative launching pad that you can use to edit, debug, and build code, and then publish an app. An integrated development environment (IDE) is a feature-rich program that can be used for many aspects of software development. Over and above the standard editor and debugger that most IDEs provide, Visual Studio includes compilers, code completion tools, graphical designers, and many more features to ease the software development process.

 

This image shows Visual Studio with an open project and several key tool windows you'll likely use:

  • Solution Explorer (top right) lets you view, navigate, and manage your code files. Solution Explorer can help organize your code by grouping the files into solutions and projects.

  • The editor window (center), where you'll likely spend a majority of your time, displays file contents. This is where you can edit code or design a user interface such as a window with buttons and text boxes.

Editions

Visual Studio is available for Windows and Mac. Visual Studio for Mac has many of the same features as Visual Studio 2019, and is optimized for developing cross-platform and mobile apps. This article focuses on the Windows version of Visual Studio 2019.

There are three editions of Visual Studio 2019: Community, Professional, and Enterprise. See Compare Visual Studio IDEs to learn about which features are supported in each edition.

Some of the popular features in Visual Studio that help you to be more productive as you develop software include:

  • Squiggles and Quick Actions

    Squiggles are wavy underlines that alert you to errors or potential problems in your code as you type. These visual clues enable you to fix problems immediately without waiting for the error to be discovered during build or when you run the program. If you hover over a squiggle, you see additional information about the error. A light bulb may also appear in the left margin with actions, known as Quick Actions, to fix the error.

  • Refactoring

    Refactoring includes operations such as intelligent renaming of variables, extracting one or more lines of code into a new method, changing the order of method parameters, and more.

  • IntelliSense

    IntelliSense is a term for a set of features that displays information about your code directly in the editor and, in some cases, write small bits of code for you. It's like having basic documentation inline in the editor, which saves you from having to look up type information elsewhere. IntelliSense features vary by language. For more information, see C# IntelliSense, Visual C++ IntelliSense, JavaScript IntelliSense, and Visual Basic IntelliSense. The following illustration shows how IntelliSense displays a member list for a type:

  • Search box

    Visual Studio can seem overwhelming at times with so many menus, options, and properties. The search box is a great way to rapidly find what you need in Visual Studio. When you start typing the name of something you're looking for, Visual Studio lists results that take you exactly where you need to go. If you need to add functionality to Visual Studio, for example to add support for an additional programming language, the search box provides results that open Visual Studio Installer to install a workload or individual component.

     

    Press Ctrl+Q as a shortcut to the search box.

  • Live Share

    Collaboratively edit and debug with others in real time, regardless of what your app type or programming language. You can instantly and securely share your project and, as needed, debugging sessions, terminal instances, localhost web apps, voice calls, and more.

  • Call Hierarchy

    The Call Hierarchy window shows the methods that call a selected method. This can be useful information when you're thinking about changing or removing the method, or when you're trying to track down a bug.

  • CodeLens

    CodeLens helps you find references to your code, changes to your code, linked bugs, work items, code reviews, and unit tests, all without leaving the editor.

  • Go To Definition

    The Go To Definition feature takes you directly to the location where a function or type is defined.

  • Peek Definition

    The Peek Definition window shows the definition of a method or type without actually opening a separate file.

Install the Visual Studio IDE

In this section, you'll create a simple project to try out some of the things you can do with Visual Studio. You'll use IntelliSense as a coding aid, debug an app to see the value of a variable during the program's execution, and change the color theme.

To get started, download Visual Studio and install it on your system. The modular installer enables you to choose and install workloads, which are groups of features needed for the programming language or platform you prefer. To follow the steps for creating a program, be sure to select the .NET Core cross-platform development workload during installation.

When you open Visual Studio for the first time, you can optionally sign in using your Microsoft account or your work or school account.

Create a program

Let's dive in and create a simple program.

  1. Open Visual Studio.

    The start window appears with various options for cloning a repo, opening a recent project, or creating a brand new project.

  2. Choose Create a new project.

    The Create a new project window opens and shows several project templates. A template contains the basic files and settings needed for a given project type.

  3. To find the template we want, type or enter .net core console in the search box. The list of available templates is automatically filtered based on the keywords you entered. You can further filter the template results by choosing C# from the Languagedrop-down list. Select the Console App (.NET Core) template, and then choose Next.

  4. In the Configure your new project window, enter HelloWorld in the Project name box, optionally change the directory location for your project files, and then choose Create.

    Visual Studio creates the project. It's a simple "Hello World" application that calls the Console.WriteLine() method to display the literal string "Hello World!" in the console (program output) window.

    Shortly, you should see something like the following:

    The C# code for your application shows in the editor window, which takes up most of the space. Notice that the text is automatically colorized to indicate different parts of the code, such as keywords and types. In addition, small, vertical dashed lines in the code indicate which braces match one another, and line numbers help you locate code later. You can choose the small, boxed minus signs to collapse or expand blocks of code. This code outlining feature lets you hide code you don't need, helping to minimize onscreen clutter. The project files are listed on the right side in a window called Solution Explorer.

    There are other menus and tool windows available, but let's move on for now.

  5. Now, start the app. You can do this by choosing Start Without Debugging from the Debug menu on the menu bar. You can also press Ctrl+F5.

    Visual Studio builds the app, and a console window opens with the message Hello World!. You now have a running app!

  6. To close the console window, press any key on your keyboard.

  7. Let's add some additional code to the app. Add the following C# code before the line that says Console.WriteLine("Hello World!");:

    C#복사

    Console.WriteLine("\nWhat is your name?"); var name = Console.ReadLine();

    This code displays What is your name? in the console window, and then waits until the user enters some text followed by the Enter key.

  8. Change the line that says Console.WriteLine("Hello World!"); to the following code:

    C#복사

    Console.WriteLine($"\nHello {name}!");
  9. Run the app again by selecting Debug > Start Without Debugging or by pressing Ctrl+F5.

    Visual Studio rebuilds the app, and a console window opens and prompts you for your name.

  10. Enter your name in the console window and press Enter.

  11. Press any key to close the console window and stop the running program.

Use refactoring and IntelliSense

Let's look at a couple of the ways that refactoring and IntelliSense can help you code more efficiently.

First, let's rename the name variable:

  1. Double-click the name variable to select it.

  2. Type in the new name for the variable, username.

    Notice that a gray box appears around the variable, and a light bulb appears in the margin.

  1. Select the light bulb icon to show the available Quick Actions. Select Rename 'name' to 'username'.

    The variable is renamed across the project, which in our case is only two places.

  1. Now let's take a look at IntelliSense. Below the line that says Console.WriteLine($"\nHello {username}!");, type DateTime now = DateTime..

    A box displays the members of the DateTime class. In addition, the description of the currently selected member displays in a separate box.

  2. Select the member named Now, which is a property of the class, by double-clicking on it or pressing Tab. Complete the line of code by adding a semi-colon to the end.

  3. Below that, type in or paste the following lines of code:

    C#복사

    int dayOfYear = now.DayOfYear; Console.Write("Day of year: "); Console.WriteLine(dayOfYear);

     

    Console.Write is a little different to Console.WriteLine in that it doesn't add a line terminator after it prints. That means that the next piece of text that's sent to the output will print on the same line. You can hover over each of these methods in your code to see their description.

  4. Next, we'll use refactoring again to make the code a little more concise. Click on the variable now in the line DateTime now = DateTime.Now;.

    Notice that a little screwdriver icon appears in the margin on that line.

  5. Click the screwdriver icon to see what suggestions Visual Studio has available. In this case, it's showing the Inline temporary variable refactoring to remove a line of code without changing the overall behavior of the code:

  6. Click Inline temporary variable to refactor the code.

  1. Run the program again by pressing Ctrl+F5. The output looks something like this:

Debug code

When you write code, you need to run it and test it for bugs. Visual Studio's debugging system lets you step through code one statement at a time and inspect variables as you go. You can set breakpoints that stop execution of the code at a particular line. You can observe how the value of a variable changes as the code runs, and more.

Let's set a breakpoint to see the value of the username variable while the program is "in flight".

  1. Find the line of code that says Console.WriteLine($"\nHello {username}!");. To set a breakpoint on this line of code, that is, to make the program pause execution at this line, click in the far left margin of the editor. You can also click anywhere on the line of code and then press F9.

    A red circle appears in the far left margin, and the code is highlighted in red.

  2. Start debugging by selecting Debug > Start Debugging or by pressing F5.

  3. When the console window appears and asks for your name, type it in and press Enter.

    The focus returns to the Visual Studio code editor and the line of code with the breakpoint is highlighted in yellow. This signifies that it's the next line of code that the program will execute.

  4. Hover your mouse over the username variable to see its value. Alternatively, you can right-click on username and select Add Watch to add the variable to the Watch window, where you can also see its value.

  5. To let the program run to completion, press F5 again.

To get more details about debugging in Visual Studio, see Debugger feature tour.

Customize Visual Studio

You can personalize the Visual Studio user interface, including change the default color theme. To change to the Dark theme:

  1. On the menu bar, choose Tools > Options to open the Options dialog.
  1. On the Environment > General options page, change the Color theme selection to Dark, and then choose OK.

    The color theme for the entire IDE changes to Dark.

To learn about other ways you can personalize the IDE, see Personalize Visual Studio.

Next steps

Explore Visual Studio further by following along with one of these introductory articles:

If you're ready to dive into more coding, one of the following language-specific quickstarts is a good next step:

See also

피드백

visual Stuido에서 F5(디버그)를 실행 하면 아래의 사진처럼 오류가 나오는 경우가 있습니다.


오류메세지는 IIS Express 웹 서버를 시작할 수없습니다.


IIS Express로부터의 출력: Starting IIS Express ... IIS Express is running.


입니다.


webconfig 파일을 수정해도 해당 오류가 계속 발생하여 테스트 하는데 엄청 애먹었지만 해결 방법은 간단했습니다.


비주얼스튜디오를 관라자 권한을 실행하면 해결 됩니다.



저처럼 어려움을 겪으신분들은 이글이 많은 도움이 되었으면 합니다.





+ Recent posts