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..."
 
Improve readability and add an example
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.


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 9:


==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.


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

Revision as of 16:28, 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.

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.