Search code examples
c#.netdockerdocker-composerider

Debbugging for GRPC Service is not available when there are more than one projects in docker-compose.yml


I'm facing a problem with developing a microservices application using .NET and Rider. My solution (.sln) has two projects - an ASP.NET Blazor Server app and an ASP.NET GRPC Service.

When I add only the GRPC project to my docker-compose, the debugger works fine and I can attach breakpoints. However, when I add another project to docker-compose, the web app, the debugger works for the Blazor project; But the breakpoint icon in the GRPC service transforms into a gray 🚫 icon and I get an error when I hover on that breakpoint placed in the GRPC service:

Didn't find the associated module for the breakpoint T:\LatestBargeh\Services\Users.API\Services\GreeterService.cs:16,2

Error in Rider

Here's my docker-compose:

services:
  users.api:
    image: users.api
    build:
      context: .
      dockerfile: Services/Users.API/Dockerfile

#  wapp.server:
#    image: wapp.server
#    build:
#      context: .
#      dockerfile: Wapp.Server/Dockerfile

The second service is the web app, and the first one is the GRPC service.

I would really appreciate your support in solving this issue. Thank you!


Solution

  • Answer: According to this issue, the 🚫 icon being displayed is a false sign and debugging works. The Rider team has mentioned that this problem is due to running two debugger sessions, and they are thinking about improving this experience. There is a workaround to fix this problem, by adding a separate docker-compose.yml file for the GRPC service, but it's not necessary.