In this recipe, we will be looking at how to debug a .NET Standard 2.0 library using Visual Studio 2017 and its debugging tools. We will be using the same solution we created in the previous recipes.
Make sure you have completed the previous recipes and built them without any issues. Let's get started.
- Open Visual Studio 2017.
- Now, open the solution from the previous recipe. Click
File
|Open
|Open Project/Solution
, or press Ctrl + Shift + O, and select theChapter10.Logging
solution.
- Press Ctrl + Shift + B for a quick build to check that everything is fine.
- The
Solution Explorer
should look like this:
- Now, double-click on the
LoggerDemo.cs
label to open the code window. - Scroll down until you reach the
WriteLog()
method. - Now, as shown in the following, click on the gray bar on the left side of the code window to add a debug point:
- Again, click on the
Program.cs
tab. - Press F5 to debug the code.
- As you can see, the...