LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Format of Variables Change When Debugging

When debugging in LabWindows, the format of the variables (decimal, hex, ASCII, etc.) is always set to the default under certain circumstances.  For example if you step into a function, change format of a variable, step out then back in, the format has been reset to the default.  There are other instances when you run, stop, rebuild and debug where this is done also.
 
I've asked NI to explain why the variable format can't be retained, at least within one debug session (until exiting LabWindows).  The explanation is they use a stack-based system to store this information so it is lost during debug.
 
I find this to be an extreme annoyance and an enormous waste of time.  For example, I deal with a lot of arrays of binary data.  Seeing these array values in ASCII is of no value.  So I'm nearly constantly setting the format back to hex during debugging.
 
I'm curious whether anyone else thinks this is a problem.  NI knows about this, but it's unlikely they'll do anything unless there is a lot of feedback from us users on the value of fixing this.  Post a note and let me (and NI) know what you think, whether you think this is important or not.
 
Thanks,
 
Dave
0 Kudos
Message 1 of 15
(5,161 Views)

Hello d.,

Thank you for posting on the NI Discussion Forums.  It is true that Watch expressions revert back to the default format after closing out of LabWindows/CVI, and then re-opening the project.  As the LabWindows/CVI 8.5 Help states, the default format can be set by right-clicking in the Watch window, and then selecting Format » Preferences.  In the Preferences window, you can select the default formats for all char/int/long variables, as well as all float/double variables.

What version of LabWindows/CVI are you using?  When I set a watch expression to be some format other than the default, and step into my callback functions to monitor those expressions (both local and global variables), the format is retained.  When I exit the subroutine, and step back into it on successive calls, the format is still whatever I last set it to.  I can also stop debugging, and then start again, and the formats are still retained for my Watch expressions.  Only closing out of the current debug session (i.e. closing the workspace, or exiting LabWindows/CVI) forces the formats back to default.  This is all in the same source file, using version 8.5 of LabWindows/CVI.  Are your subroutines contained in the same source file, or separate files?

Unfortunately the formats cannot be saved between debug sessions if they are set to anything other than the default format.  We do welcome suggestions for future releases of our products at our Product Suggestion Center page.  Thanks for the feedback!

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 2 of 15
(5,134 Views)

Hi Chris,

Yes, using Format >> Preferences is exactly what I was talking about when I said "change the format of a variable".  Thanks for giving the exact details of doing this.

I'm still using v8.1.  I'm leery of renewing my service contract because I don't feel NI is listening to me (as a customer, not just a LabWindows user) regarding the issues that affect my work and ways to greatly improve my productivity.  I have been suggesting this for a few years now, to no avail, both with tech support on the phone and through your product suggestion center.

I can't explain all the intricacies of the issue.  Maybe what you have to do is set breakpoints and run rather than step in and out.  Here's what an engineer in NI's R&D center said:

It's not actually rebuilding the project that causes the information to be lost. It's actually even worse than that. As variables come in and out of scope, the formatting and the expand/collapse state of each variable is lost. So, if you've hit a breakpoint in a function and re-formatted a local variable, and then continue debugging outside the function, eventually stepping back into the function, the formatting for the original variable is reset when the item is created anew in the variable display, based on the data type of the variable.
The problem we have is that the formatting information is stored in stack-based memory which is associated with the actual items that you see in the variable display. As these items disappear and are re-created in the variable display, the formatting information is reset.
The complexity of representing variable scope information, including arbitrary block scopes, makes it pretty hard to maintain variable information in global, non-stack-based memory. It's obviously not impossible, but unfortunately it would require a fundamental redesign of our debugging paradigm.

Finally, we have heard this request from multiple customers, and I assure you that you are not the only customer who has asked for this feature.  The problem with this feature, as with many other feature requests is one of trade-off. It is obviously impossible to accept all the feedback that we receive, and so we are constantly having to weigh development costs of a particular feature, the risks involved in implementing it, and how widespread its benefits are.  So far, this feature has not made the cut. However, this does not mean that we're ignoring it, or any other customer feedback. Many customer-requested features have made it into previous releases, and we're confident that this will too, in the not too distant future. As a matter of fact, we can honestly say that most new features in a given CVI release originate with customer requests. I also just want to re-emphasize that each time you reiterate how important a given feature is, it drives up its priority and makes it more likely that we will implement it sooner, rather than later. With that in mind, we definitely welcome your suggestion to post a note about this request in the forum. We expect other people to second the request, and the more people that do that, the better.

So my question wasn't posted for NI to respond.  It was to find out if anybody else using LabWindows finds this issue to be detrimental to productivity.

Thanks,

Dave

0 Kudos
Message 3 of 15
(5,129 Views)

Hi Dave,

 

I just wanted to give you an update on this issue. It's clear that this problem is detrimental to productivity, as you said. As such, we're bumping its priority, and we hope to have a resolution in the upcoming CVI release.

 

Sorry about the inconvenience this has caused you, and other users, and thanks for taking the time to alert us to the problem.

 

Luis

0 Kudos
Message 4 of 15
(5,054 Views)

Hi Luis,

 

I had given up hope NI would fix this.

 

THANKS!  I believe this will be a big time-saving improvement.

 

Dave

0 Kudos
Message 5 of 15
(5,051 Views)

Luis,

 

You posted that NI would be addressing this problem nearly a year ago.  Can you tell me when I can expect to see a version of LabWindows that has this fixed?

 

Thanks,

 

Dave

0 Kudos
Message 6 of 15
(4,709 Views)

It will be fixed in a release that's coming out at the end of this year.

 

Luis

0 Kudos
Message 7 of 15
(4,695 Views)

Hi Luis,

 

Thanks for the reply and your efforts.  If you remember, could you post again when you know what release this will be in?  (No need to reply to this email though.) 

 

Dave

0 Kudos
Message 8 of 15
(4,690 Views)

This drives me CRAZY!!!!

I feel like I take more time resetting variables back to hex than I am actually debugging my code.

This is a frustration I've seen in all versions up the 9.0.

 

I have the disks for 9.0.1 on my desk, will that fix this annoyance?

Message Edited by Ken (This is my stinking alias) on 05-05-2010 08:29 AM
0 Kudos
Message 9 of 15
(4,217 Views)

This was fixed in CVI 2009. Not in 9.0.1.

 

I apologize for forgetting to post an update in this thread.

 

Luis

0 Kudos
Message 10 of 15
(4,207 Views)