Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Does the Eclipse debugger have a way to display a method's return value?
Does the Eclipse debugger have a way to display a method's return value? [message #154435] Thu, 15 April 2004 16:19 Go to next message
Russell Gonsalves is currently offline Russell GonsalvesFriend
Messages: 18
Registered: July 2009
Junior Member
In a previous life I used a windowing debugger which also accepted commands,
the output of which was shown in a "log" window. As one stepped out of a
method the debugger would stop at the "epliog hook" and issuing a print
command (typically used with arguments to print (display) the value of a
variable) without arguments would print out the return value (if the method
returned a value as opposed to a "void" method). Does the Eclipse debugger
let one inspect return values? There are times when the value of an
expression involving method calls is returned, and that return value used in
another expression in the calling context so there's no variable to
inspect - at such times how would I display the return value? Often the
code is not mine, so modifying it is not an option.

Thanks,

Russell
Re: Does the Eclipse debugger have a way to display a method's return value? [message #154501 is a reply to message #154435] Thu, 15 April 2004 19:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Russell Gonsalves wrote:

> In a previous life I used a windowing debugger which also accepted commands,
> the output of which was shown in a "log" window. As one stepped out of a
> method the debugger would stop at the "epliog hook" and issuing a print
> command (typically used with arguments to print (display) the value of a
> variable) without arguments would print out the return value (if the method
> returned a value as opposed to a "void" method). Does the Eclipse debugger
> let one inspect return values? There are times when the value of an
> expression involving method calls is returned, and that return value used in
> another expression in the calling context so there's no variable to
> inspect - at such times how would I display the return value? Often the
> code is not mine, so modifying it is not an option.

I believe there is a feature request or this in Bugzilla - try searching
for it or creating a new one if you can't find it.

HTH,
Eric
--
The wages of sin are death; but after taxes are taken out, it's just a
tired feeling.
Re: Does the Eclipse debugger have a way to display a method's return value? [message #154568 is a reply to message #154501] Fri, 16 April 2004 02:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcorbin.machturtle.com

Eric Rizzo wrote:

> Russell Gonsalves wrote:
>
>> In a previous life I used a windowing debugger which also accepted
>> commands,
>> the output of which was shown in a "log" window. As one stepped out of a
>> method the debugger would stop at the "epliog hook" and issuing a print
>> command (typically used with arguments to print (display) the value of a
>> variable) without arguments would print out the return value (if the
>> method
>> returned a value as opposed to a "void" method). Does the Eclipse
>> debugger
>> let one inspect return values? There are times when the value of an
>> expression involving method calls is returned, and that return value used
>> in another expression in the calling context so there's no variable to
>> inspect - at such times how would I display the return value? Often the
>> code is not mine, so modifying it is not an option.
>
> I believe there is a feature request or this in Bugzilla - try searching
> for it or creating a new one if you can't find it.
>

I've been told (might have been in a bug report) that the JVM debugger
"framework" doesn't support this. :(

David
Re: Does the Eclipse debugger have a way to display a method's return value? [message #156394 is a reply to message #154568] Wed, 28 April 2004 22:10 Go to previous message
Eclipse UserFriend
Originally posted by: neil.neil.swingler.name

"David Corbin" <dcorbin@machturtle.com> wrote in message
news:c5nenu$lv0$1@eclipse.org...
> Eric Rizzo wrote:
>
> > Russell Gonsalves wrote:
> >
> >> In a previous life I used a windowing debugger which also accepted
> >> commands,
> >> the output of which was shown in a "log" window. As one stepped out of
a
> >> method the debugger would stop at the "epliog hook" and issuing a print
> >> command (typically used with arguments to print (display) the value of
a
> >> variable) without arguments would print out the return value (if the
> >> method
> >> returned a value as opposed to a "void" method). Does the Eclipse
> >> debugger
> >> let one inspect return values? There are times when the value of an
> >> expression involving method calls is returned, and that return value
used
> >> in another expression in the calling context so there's no variable to
> >> inspect - at such times how would I display the return value? Often
the
> >> code is not mine, so modifying it is not an option.
> >
> > I believe there is a feature request or this in Bugzilla - try searching
> > for it or creating a new one if you can't find it.
> >
>
> I've been told (might have been in a bug report) that the JVM debugger
> "framework" doesn't support this. :(
>
Which is a shame for anybody who follows Martin Fowler's recomendations to
replace temporary variables with query methods. Although if the method has
no side effects, you can just evaluate it in the debugger and examine the
result that way.

--
Neil Swingler
Previous Topic:Getting IResource from DebugPlugin
Next Topic:Launch configurations should be stored in projects
Goto Forum:
  


Current Time: Thu Apr 25 04:56:17 GMT 2024

Powered by FUDForum. Page generated in 0.03307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top