Configuring VS Code debug for Dapr
Throughout 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/vscode-how-to-debug-multiple-dapr-apps/.
The following sections 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 of the chapter, 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\practical-dapr\chapter02\sample.microservice. webapi>...