How to "smart step"

I have seen the announcement in the milestone 1 release notes and have seen some discussion about it.

What I can't figure out is how I can actually use smart step in the debugger ui to choose one of several method calls in a line/expression to step into.

More precisely I don't see any difference at all in the debugger ui.

What am I missing?

8 comments
Comment actions Permalink

It's only available from the menu:

Run -> Smart Step Into (or simply Shift+F7)

Stephen Friedrich wrote:

I have seen the announcement in the milestone 1 release notes and have seen some discussion about it.

What I can't figure out is how I can actually use smart step in the debugger ui to choose one of several method calls in a line/expression to step into.

More precisely I don't see any difference at all in the debugger ui.

What am I missing?


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Currently you need to click Shift+F7 to pop up the context menu showing the
steps, (optionally cursor-up/-down) and Enter.

Wouldn't it be much more userfriendly, when it would work like Alt+Tab on
any operating system (I know, it only could work like this when the shortcut
contains modifiers like Shift/Ctrl/...)?
- pressing and holding Shift+F7 opens the context menu with the first entry
selected (the one which would be invoked next with F7)
- as long as the Shift key is hold, one could press F7 to change the
selection to the next step
- releasing the Shift key finally invokes the action

What do you think? Vote for this suggestion at

http://www.jetbrains.net/jira/browse/IDEA-13889

Tom

0
Comment actions Permalink

Oops, such a shiny new feature hidden in the main menu.
For some reason debugging is about the only activity I do using the mouse instead of keyboard. That makes using smart step quite inconvenient.

I think it should be in the debugger toolbar.
When space is too scarce then "Force Step into" button could be removed instead.

0
Comment actions Permalink

Love it. Voted.

N.

Tom wrote:

Currently you need to click Shift+F7 to pop up the context menu showing
the steps, (optionally cursor-up/-down) and Enter.

Wouldn't it be much more userfriendly, when it would work like Alt+Tab
on any operating system (I know, it only could work like this when the
shortcut contains modifiers like Shift/Ctrl/...)?
- pressing and holding Shift+F7 opens the context menu with the first entry
selected (the one which would be invoked next with F7)
- as long as the Shift key is hold, one could press F7 to change the
selection to the next step
- releasing the Shift key finally invokes the action

What do you think? Vote for this suggestion at

http://www.jetbrains.net/jira/browse/IDEA-13889

Tom

0
Comment actions Permalink

I still yearn for how VisualAge Java did it.
When stopped at a breakpoint, rather than selecting the entire line, only the method about to be evaluated would be highlighted. E.g.

print(get())

When first stepping to that line, only get() would be highlighted. Pressing step over would only eval get(). Then print(get()) would be highlighted. This allows the Smart Step functionality without adding a new button: it can all be done just with step over and step into.

Alternately, Eclipse just added smart step via a Ctrl-Click. Hold down Ctrl (could be another modifier or set of modifiers), and hover mouse over the method you want to step into. That sounds pretty rocking, especially if it could also be used on lines below the current line. It would combine Smart Step with Run to Cursor... and easy enough to make it keyboard driven as well, based on the position of the cursor.

0
Comment actions Permalink

Russell Egan wrote:

I still yearn for how VisualAge Java did it. When stopped at a
breakpoint, rather than selecting the entire line, only the method about
to be evaluated would be highlighted. E.g.

print(get())

When first stepping to that line, only get() would be highlighted.
Pressing step over would only eval get(). Then print(get()) would be
highlighted. This allows the Smart Step functionality without adding a
new button: it can all be done just with step over and step into.


+1

Alternately, Eclipse just added smart step via a Ctrl-Click. Hold down
Ctrl (could be another modifier or set of modifiers), and hover mouse
over the method you want to step into. That sounds pretty rocking,
especially if it could also be used on lines below the current line. It
would combine Smart Step with Run to Cursor... and easy enough to make
it keyboard driven as well, based on the position of the cursor.


+1 sounds also interesting

0
Comment actions Permalink

I still yearn for how VisualAge Java did it.
When stopped at a breakpoint, rather than selecting
the entire line, only the method about to be
evaluated would be highlighted. E.g.

print(get())

When first stepping to that line, only get() would be
highlighted. Pressing step over would only eval
get(). Then print(get()) would be highlighted. This
allows the Smart Step functionality without adding a
new button: it can all be done just with step over
and step into.


IMHO this is a bad idea, as stepping over a merely complex line becomes a nightmare. Currently I know that pressing F8 moves me one line down, but with this 'feature' I would have to take extremely care to press F8 only that many times that it really stops on the next line. Smart Step is something I'm using very rarely, therefore I don't want it to be the normal case.

Alternately, Eclipse just added smart step via a
Ctrl-Click. Hold down Ctrl (could be another
modifier or set of modifiers), and hover mouse over
the method you want to step into. That sounds pretty
rocking, especially if it could also be used on lines
below the current line. It would combine Smart Step
with Run to Cursor... and easy enough to make it
keyboard driven as well, based on the position of the
cursor.


That sounds better to me.

0
Comment actions Permalink

I still yearn for how VisualAge Java did it.
When stopped at a breakpoint, rather than selecting
the entire line, only the method about to be
evaluated would be highlighted. E.g.

print(get())

When first stepping to that line, only get() would be
highlighted. Pressing step over would only eval
get(). Then print(get()) would be highlighted. This
allows the Smart Step functionality without adding a
new button: it can all be done just with step over
and step into.


This has been discussed before when Smart Step Into was first introduced.
Basically, I agree with you, but apparently JPDA won't let Jetbrains implement
stuff like that; see Eugene's reply to my post
http://www.intellij.net/forums/thread.jspa?messageID=5190242&#5190242

Alternately, Eclipse just added smart step via a
Ctrl-Click. Hold down Ctrl (could be another
modifier or set of modifiers), and hover mouse over
the method you want to step into. That sounds pretty
rocking, especially if it could also be used on lines
below the current line. It would combine Smart Step
with Run to Cursor... and easy enough to make it
keyboard driven as well, based on the position of the
cursor.


Even though I don't normally use the mouse when debugging, I think this
would be a pretty cool feature and should be possible to implement
(or what do you think, Jetbrains?)

Regards,
Jens

0

Please sign in to leave a comment.