The NI Idea Exchange is a product feedback forum where NI R&D and users work together to submit ideas, collaborate on their development, and vote for the ones they like best. View all of the NI Idea Exchanges to post an idea or add your opinion on an existing one today!
byJim_Kring10-15-201011:43 AM - edited 10-15-201011:50 AM
I often find myself debugging code that seems to have "hangged" and I want to find out which VI is causing the "hang" (maybe it's waiting on some event/queue/message/timeout or maybe it's stuck in an infinite/long loop). There's no really easy way to figure out which subVI (or perhaps a node) is not returning from its call.
The way that I currently do this is to start opening up VIs and looking at their "Run Arrows" (the run buttons on the VI toolbar) to see which subVIs are currently "running" (being called).
Running (Top-Level VI)
Running (Sub-VI of a Running Top-Level VI)
<< This is what I look for
Not Running (Sub-VI of a Running Top-Level VI)
This technique works OK, but it takes a lot of time to track down the running VI (in applications where there are LOTS of VIs), since you have to just start opening up all your VIs a looking at their run arrows.
Question: Is there any way to look at the run state of a VI using VI Server or Scripting? Unfortunately, the VI Execution.State property is "Running" for all three states shown/illustrated above (the "Idle" state is for VIs that are not reserved for execution, meaning they are not in the hierarchy of a running top-level VI). Maybe I'd also add to my feature request that it would be nice if there were a way to interrogate this state using VI Server or Scripting.
What would be nicer is if I could ask LabVIEW to Find all Running SubVIs/Nodes and visualize them by their VI Hierarchy. Maybe we could have an option to show the run state in the VI Hierarchy window. And, maybe there could be a way to only show running VIs (hide all Not Running / Idle VIs).
Now, I realize that the VI hierarchy window doesn't have any way to visualize multiple subVI "instances" of a VI, but maybe that could be an option as well (Show all SubVI instances. Also, it would be cool if we could show "Clone" instances of reentrant VIs... but, I digress.
Also, the VI hierarchy window only shows VIs, it doesn't show nodes/functions that might be running (and what's causing my code to "hang"). It might be nice if we could also include nodes, at least for the purpose of helping me find out which nodes are running.
So, I'll end by just stating that I need some easier way to figure out why my application appears to have hung and I hope that this "Idea" leads to more discussion and maybe some more features in LabVIEW to help me debug and visualize my applications.
Do you have any ideas for how to better debug applications that appear to have hung? Do you have ideas for new LabVIEW features that could help?