LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between Step Into,Step Over and Step Out ?

Hi,

 

Can anybody clearly xplain what is the diff btw Step Into,Step Over and Step Out?

In simple terms.

 

-Suneel.V

0 Kudos
Message 1 of 7
(44,111 Views)

Hi Suneel.V,

these are debugging options. With Step Into you go into the next function (loop, subvi, ...), with step over you jump over the next function and with step out you leave the current function. If you run a vi with a subvi in it the following will happen:

- step into -> go into the subvi and wait for next action

- step over -> jump over the subvi without waiting again

- step out -> if you are in the subvi, you will leave it without waiting again.

 

Hope it helps

Mike

 

Message 2 of 7
(44,108 Views)

Mike

 

It looks better.

Can you provide an example????

 

-Suneel.V

0 Kudos
Message 3 of 7
(44,106 Views)

I wonder if there would be room to expand on the debugging options here.  I find that I don't use over, or out of that often because I don't remember which is which (this message thread helps).

 

A lot of times you only want to inspect a certain section of code.  So you set a breakpoint right there then start running.  You get that breakpoint then decide what you want to do, (look at the front panel, look at wire values, step on, continue in full run, .....)  Sometimes you might hit a loop or a structure that you don't want to inspect in more detail.  Okay, so you can use the step over button to do that.  But you have to do that each time you hit that structure.  If you forget and step into, then you can of course step out, but overall, you are making a decision each time you hit the structure.  It would be nice if there were a few other types of breakpoints that go hand and hand with these step over, step out.  Basically, pick a loop, sub VI, case structure, that will automatically step over it.  Perhaps a breakpoint that once you hit it by way of single stepping, it would stop single stepping from there.  Call these "unbreakpoints".  A lot of times you only want to inspect perhaps one parallel loop and not several, but with single stepping, the highlight jumps all over the screen from one loop to the next and you quickly lose track of where you are and what you are looking.

 

The only problem would be whether you would truly want the other loops to run at full speed while your loop of interest does not.  In general, I would think you would not.  Everyone knows that it can be difficult to debug a race condition because the execution behavior is different with highlight execution turned on or off.  And this is often a symptom telling you that you have a race condition.  Having a structure that you want to debug slowly, while others run at a different speed, could possibly look like a race condition that you really don't have.  (Imagine a producer loop queueing up thousands of items per second at full speed, while a consumer loop being debugged is taking minutes to execute as you single step through it.)  But if I'm only interested in a single loop, I don't want simultaneous actions in another loop confusing me.

 

Any opinions?  The one idea I have that could help would be that I temporarily recolor the background of the loop of interest so it jumps out at me when the next step command comes back to the structure of interest.

Message 5 of 7
(44,067 Views)

If you want to break point a structure, you can do it the inside or outside of the box.  Outside of box stop on entry.  Inside of box stops on exit.  With a loop ever iteration will be a stop on inside.  Only one stop on outside.

0 Kudos
Message 6 of 7
(19,105 Views)

Hi,

  Just use the snippet in your vi and run it, the use the stepin,out&step over options, then u can able to understand how it works...

 

Brito.

0 Kudos
Message 7 of 7
(5,963 Views)