0

Let's say I am using the debugger in Visual Studio on the following code:

if (method1() == method2())
{
 // do something
}

Is there a way to see the results of method1() and method2() without manually stepping into each one and going through the whole method?

lifeformed
  • 525
  • 4
  • 16

1 Answers1

0

You can refer to the following steps to see the results of the method

  1. Set breakpoints and start debugging. enter image description here
  2. Right-click on the method and choose “Add Watch”
  3. You can check the value of the method here enter image description here
Jingmiao Xu-MSFT
  • 2,076
  • 1
  • 3
  • 10