Remote debugging a Kubernetes application
As a final step, we will debug GrpcMicroService
with Bridge to Kubernetes. Let’s set GrpcMicroService
as a starting project and change the project start from Docker to Bridge to Kubernetes, as shown in the image below:
Figure 22.11: Debugging GrpcMicroService with Bridge to Kubernetes
Let’s place a breakpoint in the GrpcMicroService->HostedServices-> ProcessPurchases.cs
file inside of the if
block, as shown below:
if (toProcess.Count > 0)
{
…
}
Then, start debugging. As soon as you click the run button, a window appears that prompts you to configure Bridge to Kubernetes:
Figure 22.12: Configuring Bridge to Kubernetes
If the window above doesn’t open, or you can’t see any Minikube node, Kubectl
is probably not working or configured for Minikube. Try issuing a Kubectl
command like kubectl get all
. If you face any issues, try stopping and restarting Minikube with...