Home > Software design >  Debugging a .net core container from docker-compose in Rider is buggy
Debugging a .net core container from docker-compose in Rider is buggy

Time:09-22

I have a solution which was written originally in VS and I'm trying to run and debug it using Rider. I'm using the original docker-compose. It mostly works smoothly, but for one thing, which is debugging.

Basically the debugging will start and run fine too, the breakpoints are being hit but some variables, when trying to see their value (no matter if by hovering, using immediate window or whatever) will instead show en error:

the name 'x' does not exist in the current context

Any ideas on what could possibly be the reason of such behaviour?

CodePudding user response:

In case anyone stumbles upon this. The solution was to change the dotnet build command's configuration flag to Debug from Release in the Dockerfile. I don't know how come it works in Visual without changing this flag, maybe there is some automatic override when setting solution run mode to debug or something. However, it seems in Rider it doesn't work automagically :)

  • Related