Search code examples
c#visual-studiodebuggingvisual-studio-2012visual-studio-debugging

How do I get the return value while debugging?


I looked through SO but couldn't find the answer, I'm sure it's there though...?

While debugging, how do I get the value of the return statement if I put a breakpoint on it? I like to condense to a single line just so it looks "pretty". But I currently don't since I can't figure out how to debug the returned result...?

using (IUnitOfWork context = new EFUnitOfWork())
{
    var repo = new ReportRepository(context);
    return repo.GetProcedureReport(startDate, endDate).ToList();
    //return result.ToList();
}

Solution

  • Select the method and right-click. Select Quickwatch from the menu.

    enter image description here

    I'm assuming you cannot put a breakpoint within GetProcedureReport?