I've got a background agent that, from what I see in my logs, doesn't complete its execution because it's blocked on an async Task
.
Of course, to understand why it's blocked, I need to debug it using Visual Studio.
The problem is that, if I use the debugger, I get the famous OutOfMemoryException
, even if MSDN states that you don't get the exception while debugging.
So the question is: how can I debug this BG Agent without running into the OutOfMemoryException
?
Because I do some complex stuff in it, and logging each line of my code would be a long process.