Smart Stepping feedback

Hi there,

let me state first that I am really glad this - long requested (see http://www.jetbrains.net/jira/browse/IDEABKL-6) - feature is finally being implemented.

However, I think it would be worth to consider a few alternatives to the current (build 6667) implementation.

What I had in mind when this was originally discussed was that during debugging, the method into which F7 would step would somehow be highlighted (e.g. by underlining the method name or displaying it in a different color) and that you would have an additional stepping mode which would execute this but not necessarily the complete statement. (Basically, this would be more something like a "Smart Step Over" than a "Smart Step Into").

Example: You debug the line foo(bar(1), baz(2));
When you first reach it, it is displayed as foo(_bar(_1_)_, baz(2)); after doing a "Smart Step Over" (during which bar(1) is executed), it changes to foo(bar(1), baz(2_)_); (after which a "standard" F7 would directly step into baz(2)) and after another "Smart Step Over", it will be foo(bar(1), baz(2)_)_;

Of course, for very complex method calls within one statement, the current "Smart Step Into" implementation could be a quicker way to the call you are interested in, but (though this may be my personal taste), I think even in that case I would prefer the "Smart Step Over" functionality described above (perhaps because the popup somehow disrupts the editor-centric debugging flow).

Finally, a minor bug report to the current implementation: If you have a statement with two calls to the same method, only one invocation is listed in the popup: "Smart stepping" into foo(bar(1), bar(2)); will only offer the methods "foo(int, int)" and "bar(int)"; selecting the latter will step into the first invocation; there is no way of directly getting to the second one.

Best regards,
Jens

8 comments
Comment actions Permalink

Jens description is what I'd always pictured for this functionality too. There was an IDE that worked exactly like this, and it was great...I think it might have been VisualAge.

0
Comment actions Permalink

the current smart step into is exactly what i need, except that i would like to choose whether i really want to step into it or just want to see the return value

0
Comment actions Permalink

Possibly related

Netbeans 6.0M7 has new feature "Expression stepping in Debugger"
Click for details.
http://wiki.netbeans.org/wiki/view/NewAndNoteWorthyMilestone7

0
Comment actions Permalink

today i thought about making a plugin that shows return values of nested calls in an expression - before "really" executing the calls. is this possible with the current openAPI?

0
Comment actions Permalink

Possibly related

Netbeans 6.0M7 has new feature "Expression stepping in Debugger"
Click for details.
http://wiki.netbeans.org/wiki/view/NewAndNoteWorthyMilestone7


That's exactly how I would like it to see in IDEA.

PS: Netbeans seems to partly rebuild an open source IDEA:
http://wiki.netbeans.org/wiki/view/Java_EditorUsersGuide

0
Comment actions Permalink

What about methods which return different values on invocation, like it.next()?

0
Comment actions Permalink

you shouldn't want to use the feature on them. or the iterator could be cloned using some secret method that can clone anything (like a modified objectin/outputstream)

0

Please sign in to leave a comment.