Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
strauss_d_getting_started_with_visual_studio_2022_learning_a.pdf
Скачиваний:
123
Добавлен:
26.06.2023
Размер:
17.04 Mб
Скачать

Chapter 2 Working with Visual Studio 2022

More flexibility is given to developers by allowing them to choose the minimum and maximum tab width as seen in Figure 2-90.

Figure 2-90.  Additional document tab options

Visual Studio Themes

Last but certainly not least, Visual Studio allows you to choose a theme. This way, you can make the IDE more personal. Microsoft has teamed up with community theme authors to test a tool that converts VS Code themes to be compatible with Visual Studio 2022. To see which themes are available, follow this link and style Visual Studio your way: https://devblogs.microsoft.com/visualstudio/custom-themes/.

Summary

Wow, this was a long chapter. We looked at many Visual Studio features and how to make working with Visual Studio better for you. We saw several project templates available

to developers, including the new MAUI project template. We saw how to create a MAUI application that consumes a REST Service to display weather information and how to

162

Chapter 2 Working with Visual Studio 2022

use SQLite to persist data. Visual Studio’s personalization features also allow developers to make it their own. Visual Studio 2022 is a powerhouse in the world of IDEs. I hope this chapter has shed some light on what is possible when developing world-class applications using Visual Studio 2022.

163

CHAPTER 3

Debugging Your Code

Debugging code is probably one of the most essential tasks that a developer performs. Being able to run your application and pause the execution of code midway is a lifesaver. But there is a lot more to debugging than just setting breakpoints and viewing results.

In this chapter, we will be discussing the options available to you as a developer that needs to effectively debug their code. We will be looking at

•\

Using breakpoints, conditional breakpoints, breakpoint actions and

 

labels, and exporting breakpoints

•\

Using data tips

•\

The DebuggerDisplay attribute

•\

Diagnostic Tools and Immediate Window

•\

Attaching to a running process

•\

Remote debugging

Visual Studio gives developers all the required tools in order to effectively debug the code you are experiencing problems with. Without being able to debug your code, it will be virtually impossible to resolve any issues you might be experiencing.

Not being able to effectively debug your application (not knowing how to effectively use the tools you have) is just as bad as not having the tools to debug with in the

first place.

Working withBreakpoints

If you are familiar with debugging in Visual Studio, this chapter might seem like old hat for you. Stick around, there might be sections discussed here that you didn’t know about. If you are new to Visual Studio, the concept of debugging in Visual Studio is when

you run your application with the debugger attached. Debugging allows you to step

165

© Dirk Strauss 2023

D. Strauss, Getting Started with Visual Studio 2022, https://doi.org/10.1007/978-1-4842-8922-8_3