Search code examples
asp.netiis-expressdoppler

Doppler on local .net debugger


We are implementing Doppler for secure environment variables, but in order to test code we make locally, before we release it, we want to be able to use Doppler in a local setting, so on our debugger.

Our backend is made i .net, so it runs with IIS Express, and while we can run the program local using Doppler run dotnet run we can't attach a debugger to that process (or well, we cant find a process where attaching the debugger works)


Solution

  • I found a solution with issue Start Debugger in Code, where if I start Doppler running my dotnet code in a cmd window, and keep my project open, I can choose it as an available debugger, if the code from the link is inserted.

    Edit: I use #if !RELEASE to ensure the code doesn't run on release versions.