Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Show func returns in bebug
Permanently deleted user
Created
Hi. Is there any way to watch what does func return during debug without assigning this func to some variable? (It seems that in versions before 2017 it was such kind of option in debug)
AFAIK there were no such functionality available in PhpStorm (at very least I have never noticed any special "return" variable that would contain such "function return" value myself).
it was called smth like "show method returns" in debugger window settings. but now it's gone.
it is a little bit strange why such functionality wasn't realized. as i understand if you select return string and choose Evaluate Expression it can show you the result, so why it cannot be done automatically? it is not very comfortable when the last line when you are awaiting for result just jumps away without showing the expected result.
>it was called smth like "show method returns" in debugger window settings. but now it's gone.
I personally do not remember such thing (but then -- I have never looked for such stuff .. so might have missed it).
You can download and install older PhpStorm version and test it on some simple test code -- it would be great for me to see which functionality you are talking about.
P.S. I'm referring to PHP debug only -- maybe JavaScript had it (or still has it)
I've noticed that you have not stated the language so I decided to clarify the PHP part (as this is asked in PhpStorm forum + I know more about PHP as compared to JavaScript).
2) Debugging engine that is used in PHP world (e.g. xdebug) may simply not provide such functionality at all (maybe even at byte-code level -- the way how PHP itself compiles the code) while JavaScript's one may have it out of the box (e.g. debugger protocol is much newer and developers of corresponding debugger (e.g. the one used in Chrome/NodeJS) thought that it is useful to have such info available even if it's not immediately used).
Hi there,
AFAIK there were no such functionality available in PhpStorm (at very least I have never noticed any special "return" variable that would contain such "function return" value myself).
I'm only aware of this ticket: https://youtrack.jetbrains.com/issue/WI-6834
>(It seems that in versions before 2017 it was such kind of option in debug)
You can get previous versions here: http://confluence.jetbrains.com/display/PhpStorm/Previous+PhpStorm+Releases
If you can provide reproducible scenario where IDE shows such return value of a function that would be great.
it was called smth like "show method returns" in debugger window settings. but now it's gone.
it is a little bit strange why such functionality wasn't realized. as i understand if you select return string and choose Evaluate Expression it can show you the result, so why it cannot be done automatically? it is not very comfortable when the last line when you are awaiting for result just jumps away without showing the expected result.
>it was called smth like "show method returns" in debugger window settings. but now it's gone.
I personally do not remember such thing (but then -- I have never looked for such stuff .. so might have missed it).
You can download and install older PhpStorm version and test it on some simple test code -- it would be great for me to see which functionality you are talking about.
P.S. I'm referring to PHP debug only -- maybe JavaScript had it (or still has it)
ok, thanks for reply. but just for my interest, why js has it and php not?)
1) I have not stated that JS definitely has it.
I've noticed that you have not stated the language so I decided to clarify the PHP part (as this is asked in PhpStorm forum + I know more about PHP as compared to JavaScript).
2) Debugging engine that is used in PHP world (e.g. xdebug) may simply not provide such functionality at all (maybe even at byte-code level -- the way how PHP itself compiles the code) while JavaScript's one may have it out of the box (e.g. debugger protocol is much newer and developers of corresponding debugger (e.g. the one used in Chrome/NodeJS) thought that it is useful to have such info available even if it's not immediately used).
got it. thanks.
P.S. For JavaScript (not sure how actual/relevant it is though): https://youtrack.jetbrains.com/issue/WEB-21626