Show func returns in bebug

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)

1
7 comments

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.

0
Avatar
Permanently deleted user

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.

0

>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)

0
Avatar
Permanently deleted user

ok, thanks for reply. but just for my interest, why js has it and php not?)

0

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).

0
Avatar
Permanently deleted user

got it. thanks.

0

P.S. For JavaScript (not sure how actual/relevant it is though): https://youtrack.jetbrains.com/issue/WEB-21626

0

Please sign in to leave a comment.