Jump to content

Execution highlighting: Difference between revisions

From LabVIEW Wiki
Created page with "'''Execution highlighting''' is a debugging feature in LabVIEW that allows users to observe data flow as a VI runs. When execution highlighting is enabled, exe..."
 
Add more context to the issue of parallelism
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''Execution highlighting''' is a [[debugging]] feature in [[LabVIEW]] that allows users to observe [[data flow]] as a [[VI]] runs. When execution highlighting is enabled, execution speed is reduced and parallel code runs sequentially.
[[File:Dataflow - Nodes execute in parallel.gif|frame|Execution highlighting adds a visual marker to highlight data flow, reduces the speed at which code executes and forces parallel code to run sequentially in a single thread.]]


Since parallel code runs sequentially when execution highlighting is enabled, it cannot be used to debug [[wikipedia:concurrency (computer science)|concurrency]] issues or [[wikipedia:race condition|race condition]]s.
'''Execution highlighting''' is a [[debugging]] feature in [[LabVIEW]] that allows users to observe [[data flow]] as a [[VI]] runs. It adds a visual marker to highlight data flow, reduces the speed at which code executes and forces parallel code to run sequentially in a single [[wikipedia:thread (computing)|thread]].
 
Since parallel code runs sequentially, execution highlighting cannot be used to debug [[wikipedia:concurrency (computer science)|concurrency]] issues or [[wikipedia:race condition|race condition]]s. The execution order of parallel code is also not [[wikipedia:deterministic algorithm|deterministic]] as the order in which they are executed can change between runs.<ref name="determinism"/>


Execution highlighting can be toggled through the '''Highlight Execution''' [[File:Execution Highlighting Off.png|border|Highlight Execution]] / '''Do Not Highlight Execution''' [[File:Execution Highlighting On.png|border|Do Not Highlight Execution]] button in the [[Block Diagram]] window of a VI. It can be enabled before a VI runs, while a VI runs, or when a [[breakpoint]] is reached. Execution highlighting will continue for the rest of the VI or until it is disabled.
Execution highlighting can be toggled through the '''Highlight Execution''' [[File:Execution Highlighting Off.png|border|Highlight Execution]] / '''Do Not Highlight Execution''' [[File:Execution Highlighting On.png|border|Do Not Highlight Execution]] button in the [[Block Diagram]] window of a VI. It can be enabled before a VI runs, while a VI runs, or when a [[breakpoint]] is reached. Execution highlighting will continue for the rest of the VI or until it is disabled.
Line 9: Line 11:


==Custom probe==
==Custom probe==
[[LabVIEW 2019]] added the [[Toggle Execution Highlighting]] custom [[probe]] that will toggle execution highlighting when the execution flow reaches the probe.
[[LabVIEW 2019]] added the [[Toggle Execution Highlighting]] custom [[probe]] that toggles execution highlighting when the execution flow reaches the probe.
 
==References==
<references>
<ref name="determinism">[https://forums.ni.com/t5/LabVIEW/Execution-Order/m-p/2655447/highlight/true#M791922 Re: Execution Order]</ref>
</references>


[[Category:Block Diagram]]
[[Category:Block Diagram]]
[[Category:Debugging]]
[[Category:Debugging]]

Latest revision as of 16:40, 6 May 2023

Execution highlighting adds a visual marker to highlight data flow, reduces the speed at which code executes and forces parallel code to run sequentially in a single thread.

Execution highlighting is a debugging feature in LabVIEW that allows users to observe data flow as a VI runs. It adds a visual marker to highlight data flow, reduces the speed at which code executes and forces parallel code to run sequentially in a single thread.

Since parallel code runs sequentially, execution highlighting cannot be used to debug concurrency issues or race conditions. The execution order of parallel code is also not deterministic as the order in which they are executed can change between runs.[1]

Execution highlighting can be toggled through the Highlight Execution Highlight Execution / Do Not Highlight Execution Do Not Highlight Execution button in the Block Diagram window of a VI. It can be enabled before a VI runs, while a VI runs, or when a breakpoint is reached. Execution highlighting will continue for the rest of the VI or until it is disabled.

VI Scripting

Using VI Scripting, execution highlighting can be controlled through the Highlight Execution? property of the TopLevelDiagram class.

Custom probe

LabVIEW 2019 added the Toggle Execution Highlighting custom probe that toggles execution highlighting when the execution flow reaches the probe.

References