Configuring Dapr debug in VS Code
Over the course of this book, we will leverage VS Code in exploring Dapr via several examples. Before we delve into the detailed features of Dapr, we need to understand how VS Code, the multi-platform code editor, can be configured to help us debug our sample code.
For an extended guide on how to set up Dapr debugging in VS Code, see the documentation at https://docs.dapr.io/developing-applications/ides/vscode/#manually-configuring-visual-studio-code-for-debugging-with-daprd.
The following steps will guide us in configuring debugging in VS Code on a copy of our hello world sample from the previous chapter.
Attaching the debugger
In the working area, you will find the samples from Chapter 1, Introducing Dapr. From Command Prompt, you can launch a sample via the Dapr CLI with the dotnet run
command to launch the Web API project, previously modified to accommodate Dapr, as follows:
PS C:\Repos\dapr-samples\chapter02\sample.microservice...