Author: jtagg (NI)
I've often wished I could add a comment to a running diagram while debugging. Either a note for later to correct something or some commenting as I watch it unfold.
Here's a workaround based on a right-click plugin. The idea is that you can create notes on certain portions of code while it's running. These will be aggregated and you can then have it create associated free labels after the VI is done executing.
1. Right-click on the object to mark and select "New Debug Note..."
2. Write a note about the object you clicked on
3. A list is maintained in the debugger notepad
From this list it is possible to quickly return to the marked object by clicking on Show Object. The Label Object and Label All buttons are only enabled if the VI is not in run-mode since it doesn't work otherwise.
This window stays open until you close it by pressing on Close. Closing the window will clear all notes but will open again if you create new notes.
This window allows you to easily navigate back to the code portions you marked at run-time and to quickly create free labels:
Notes:
edit 12.12.2016: removed compiled code.
Attachement is saved in LabVIEW 2015. For install instructions, go here.
I like the idea but for clarity you might change the name to something more like "debugger notepad" (just the first thing to pop into my head). "Marks" sounds more like probes or breakpoints or something like that.Maybe I'm the only one.
I chose 'marks' because I had a bigger vision for what this tool can do and I thought the name would be appropriate. Limited to creating notes for debug sessions however, I agree that the name is not as good as it should be. Debugger notepad isn't a bad idea actually because it expresses what it does better than marks do.
Thanks for the feedback.
Ah, makes sense. The name gave me an idea, though . Posting in a moment.
edit:
This is an awesome idea. Great brainstorm!
From the comments on my idea http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-comments-to-be-added-in-runtime/idc-p/3185191#M3... I found this tool. Once I have LV2015 installed I add it to my toolbox.
However I do have one suggestion: can you make the label placement automatic as soon as the code stops running?
TimBotsM wrote:
However I do have one suggestion: can you make the label placement automatic as soon as the code stops running?
I don't think he can. He'd need to grab the Call Chain of the VI that you want to comment on, crawl up the call chain to the root VI and monitor for an event for when that caller VI goes idle. Two problems:
1. There's no event to catch for a VI going idle.
2. Even if there were such an event, there may be multiple callers. Or callers may quickly come and go once you start working with lots of dynamic VI refnums.
I can't think of any solution for this request.
AQ beat me to it.
I wanted to do that originally, but I quickly saw that any effort I put into that would be half-baked at best. I wanted something simple and predictable and I think this is a good compromise given that I don't have too much time for it.