How to see Return Values
When debugging, I have been unable to get Rider to show me values returned from functions.
I have clicked on the 3 dots → Debugger settings and have picked “Show Function return values”, as you can see in the attached screenshot.
.
However, while executing, I never see any returned values in the variables tab. Does anyone know what I need to do?
Please sign in to leave a comment.
Hello,
Thank you for contacting Rider support and for your question.
Due to native debugger limitations used by Rider (lldb), this feature works different in Unreal Engine/C++ projects. Unfortunately, the return value is reported only on Step Out of the method. In other words: it works in two following scenarios:
Hope that helps. Should you have any other questions or difficulties, please let me know.
Have a nice day!
Hi!
In my case, that context menue is not shown on a standard C# .net web application as well.
Is there any workaround for that?
Hello Mostafa,
Thank you for contacting Rider support.
Would you mind elaborating on the problem and sharing an extra screenshot that demonstrates the issue? I am afraid I didn't get the problem. Do you mean this context menu by chance?
Sorry for the confusion!
I meant the “Show Method Return Values context” option under the Debugger Settings menu. (similar to this in WebStorm)
I want to simply look into the return value of a method with an expression body. e.g.
public int Sum(int x, int y) => x + y;
While debugging, I want to see what Sum returns in place.
Currently what I do is to assign the result on an auxiliary variable and put a breakpoint on that which is not practical. e.g.
public static int Sum(int x, int y)
{
var z = x + y;
return z;
}
Hello Mostafa,
Please ensure the option “Settings | Build, Execution, Deployment | Debugger | Show return values” is turned on.
Can you see the return value after “Step Over” on Sum method invocation? Look at the screenshots below: