调试返回值

编程入门 行业动态 更新时间:2024-10-28 01:23:36
本文介绍了调试返回值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我记得当我在Visual Studio 6.0中调试一个 C ++ 代码时,可以看到方法的返回值。 现在我在Visual Studio 2010中的 C#中缺少该功能。 哪里可以看到返回值,还是有原因不显示?

Edit1:示例:

string GetFullName () { return GetFirstName()++ GetLastName(); }

从行开始的行(调试器)返回到下一行我想在调试变量窗口中看到全名。

解决方案

这是在Visual Studio中添加的2013年:

返回值显示在Autos Windows(Debug-> Windows-> Autos)中,您还可以使用伪变量$ Watch和/或Immediate窗口中的ReturnValue,以获取最后一个函数的返回值。

blogs.msdn/ b / visualstudioalm / archive / 2013/06/27 / see-function-return-values-in-the-debugger-in-visual-studio-2010.aspx

I can remember that I could see the return value of a method when I debug a C++ code in Visual Studio 6.0. Now I am missing that feature at C# in Visual Studio 2010. Where can I see the return value or is there a cause for not showing it?

Edit1: An example:

string GetFullName() { return GetFirstName() + " " + GetLastName(); }

When I step (debugger) from row beginning with return to next line I would like to see the full name in a debug variable window.

解决方案

This was added in Visual Studio 2013:

The return value(s) get displayed in the "Autos Windows" (Debug->Windows->Autos) and you can also use the pseudo variable "$ReturnValue" in the Watch and/or Immediate window to fetch the last function’s return value.

blogs.msdn/b/visualstudioalm/archive/2013/06/27/seeing-function-return-values-in-the-debugger-in-visual-studio-2013.aspx

更多推荐

调试返回值

本文发布于:2023-10-26 14:40:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1530439.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:返回值

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!