DETT Saves the Day!
Disclaimer: This is not a veiled marketing post, attempting to entice you to purchase Desktop Execution Trace Toolkit (DETT). However, we and our customers have experienced much value from this tool and we think it’s valuable for anyone writing large LabVIEW applications. (Perhaps we would should have listened to NI’s marketing presentations earlier. 😉 )
Are you currently using Desktop Execution Trace Toolkit (available for LabVIEW 8.6.1 or later)?
If you answered yes, skip this post, or rather fast forward to the comments and let us know if you have additional feature requests.
For those of us who are not using DETT, does anyone actually have a reasonable excuse? Cost? Time? One more tool to learn?
Costs Too Much?
NI wisely rolled DETT (as well as VI Analyzer and the Unit Test Framwork) into the LabVIEW Developer Suite in 2011. So if you own Developer Suite, you have no additional cost. Otherwise, it’s a $999 investment with an enormous payback. One customer was able to identify and fix 90% of the memory leaks in less than a day. Another was able to identify the source of unreported errors in minutes. Those undetected issues would have been far more expensive had they not been repaired prior to deployment.
Yes, this is one more step in your process. It does take time to run your code through various scenarios. However expending a few hours or a day during development may save you that or far more after deployment.
One More Tool to Learn?
Yes, but this tool is very simple and you should be up and running over your lunch break, even if you only have a spare 30 minutes. Follow these steps:
- Enable VI Server Support by going to Tools>>Options>>VI Server and selecting TCP/IP under Protocols. If you don’t, the DETT will remind you about this step. (Note that the reminder
- Once you are in DETT, select new trace.
- Specify the instance that you want to trace.
- Select Start.
- Run your code.
It’s really that simple.
But Wait… There’s More…
Actually we have two very minor bugs to mention. Both have Corrective Action Requests (CARs) submitted, and fixes should be integrated into future releases.
- If you do not turn on VI Server Support, you will see a warning from DETT. The error message could be clearer. See #1 above.
- If you are using the evaluation version of DETT you have to use a small trick to start the trace. When you select New Trace, you are now in the New Trace Connection dialog box. If you leave the selection on “Local Application Instance”, the “OK” button is disabled. It may appear that you cannot start a new trace. However, if you select one of the other options, and then reselect “Local application instance,” then the “OK” button is enabled and you can now start a new trace and proceed. This does not occur with a licensed version of DETT.
What Does the DETT Do For Me?
First, you choose what you want to capture. You see a stream of all of the specified events, when they occurred and additional notes about each.
You can quickly find memory leaks due to references that have not been closed. If the Queue is named and you are also tracing general use of the Queue, then you can easily fine the source of the leak.
Unsure about how your code is functioning? You can insert your own messages into the trace with the Generate User-Defined Trace Event function. This is a useful way to add debugging code to your application.
Are you finding discrepancies between running your code in the Development System versus the Run Time System? Run DETT for both instances and compare. If you’ve deployed your code to a remote machine with only a runtime engine installed, you can still connect to and trace the application running remotely!
DETT should be easy to incorporate into your LabVIEW workflow, and is worth learning and applying. Let us know if it isn’t.
… Oh, and Those New Features…
This screenshot is from an NI-internal prototype we created as an alternate way of visualizing the trace data. It uses the 3D Picture Control. Here, time extends off into the distance, call depth extends vertically up (the deeper the call hierarchy, the taller the trace), and threads are left to right in different colors. In the prototype, you can scroll around, zoom in, and rotate around the data for more scrutiny. We currently have no plans to productize this kind of visualization, but please let us know if you think something like this would be valuable. What other new features would help you?