Visual Studio - How to change the return value of a method in the debugger?

前端 未结 6 478
轻奢々
轻奢々 2021-01-02 08:12

When I\'m debugging, I often have to deal with methods that does not use an intermediate variable to store the return value :

   private int myMethod_1()
            


        
6条回答
  •  悲&欢浪女
    2021-01-02 08:44

    For those who are looking for a solution to this in VB.NET:

    It was so simple, I can't believe I did not see it : To look at the value a function will return : just place the pointer over the function's name. The value will be shown in a tool tip.

    The change the value : just click on this tool tip, change the value and hit enter.

    Visual Studio is very cool !

    Note : I tested it in VB.NET on Visual Studio Team System 2008. Just tried using C#, but it does not work... :-(

提交回复
热议问题