Debugger: How do you step-in in a one of "chained" methods?

Often I see constructs like

Factory.getStuff().doThings( MoreFactory.getStuff() ).doThings().doAgain()

What is a simplest method to skip all methods in a chain and only step inside one particular? Or execute them step-by step? Sometimes it is usefull to see where exactly inside a chain exception had been thrown.
Is there a kind of Step-over but working not on a full statement but rather on it's parts? It would be nice to have such a feature and a sub-statement to be executed next should be highlighted...
I think eclipse doing a kind of that when step-over, but it doesn't highlight a next statement it going to execute, so it's seems to be pretty useless...

0
5 comments
Avatar
Permanently deleted user

Igor Romanov wrote:

Factory.getStuff().doThings( MoreFactory.getStuff()
).doThings().doAgain()

What is a simplest method to skip all methods in a chain and only
step inside one particular? Or execute them step-by step? Sometimes
it is usefull to see where exactly inside a chain exception had been
thrown.


I haven't found a simple way of doing this so I usually step in (into
the first chained call), step out (back to the top level), step in (into
the next chained call), step out, and so on, until I reach the method I
really wanted to see.

In some cases adding a breakpoint in the method you want to see (and
then just pressing "play" to run until the breakpoint) might be more
convenient, as long as that method isn't called from too many other
locations.

0
Avatar
Permanently deleted user

2 Plugin gurus:

Is this possible to provide such a functionality via a plugin?

0
Avatar
Permanently deleted user

Maybe. You must get two actions 'Step In', 'Step Out'. Then create implementation of another one action, and delegate event into these two actions sequentialy.

0
Avatar
Permanently deleted user

This is one of the most voted-for enhancement requests. See http://www.jetbrains.net/jira/browse/IDEABKL-1206

Regards,
Jens

0
Avatar
Permanently deleted user

Wow. Seems that I'm not alone... :)))

0

Please sign in to leave a comment.