While Loop is Blinking Red at Each Iteration in LabVIEW

Updated Aug 17, 2023

Reported In

Software

  • LabVIEW

Issue Details

When I click the Run button, my code executes, but after each iteration of my while or for loop, my program halts and the loop blinks. I have to click the Run button again to get it to resume execution. I also noticed that the inside of the loop's border is red (see figures below). Why is it doing this, and how do I fix it?

Solution

You may have placed a breakpoint inside of your loop inadvertently. This will break your program execution after every iteration of your loop. To remove this breakpoint, you must use the Breakpoint Tool (selected in the figure below). To open the Tools Palette, hold Shift and right-click on the Front Panel, or open the View menu and select Tools Palette

With the Breakpoint Tool selected, you can click inside of your loop to clear the breakpoint.

Another way to remove the breakpoint is to use the Breakpoint Manager. Bring up the Breakpoint Manager window (shown below) by right-clicking on the border of the loop and selecting Breakpoint»Breakpoint Manager. Once in the Breakpoint Manager window, you can remove the breakpoint by selecting the breakpoint and then pressing Clear (Delete). Double-clicking a breakpoint in the Breakpoint Manager will highlight it on the block diagram.

Additional Information

Having the breakpoint after each iteration of your loop is not the same as right-clicking the border of your loop with the Positioning/Resize Tool and selecting Set Breakpoint because doing so will only break the execution when entering your loop. You will notice that doing this creates a red outline outside of the loop's border rather than inside.