Call Methods from the Watch Window

We all use watch windows for debugging the code. Mostly it is used to watch the values of the object or to change the value and observe the result. However we can even use watch window to evaluate results for the methods. I would be sharing how one can call the methods from watch windows.

After executing the code just open the watch window and type the object name to get the method.



In the screenshot above, you can see that I have tried to call the method “AppendNames”.

Just type in the required parameters and use can check the results before executing your code.

Also you can store the value in a temporary variable using the immediate window.

Just create a temp variable like “d” in the above screenshot and assign the return value to this variable.

I hope this technique is helpful to you when you are debugging your code.

Ebook Download
View all
Learn
View all