LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical sourcecode issues while debugging

Currently we are trying to setup our new testsystems with Teststand 2013, and LabWindows CVI 2013 SP2 as coding base for dlls.

At the moment, theres a very annoying bug, i can't resolve during the debug process in LabWindows CVI.

 

The problem is, that the most functions are debugged correctly, but LabWindows CVI has some strange behaviour with other, well developed and tested functions.

I can manually step throught them, CVI executes the right commands in background, but shows weird things in its code area, like on this picture.

Sometimes it shows comments as command, steps thought empty lines, or shows half of a command and variable as code command.

It seems, like CVI executes commands in other sourcecode lines, than shows in its red marked are.

The shown code works as it should, but debugging isn't possible with this issue.

I hope, someone can help us with this problems.

 

 

1.PNG

 

2.PNG

 

3.PNG

 

 

0 Kudos
Message 1 of 8
(4,877 Views)

Hello swenbo89,

 

1. Was the code modified since it was last time built? If it was modified then the highlight corresponds to the location when the code was last built.

2. Do you use #line directives? #line modifies the source position so the debugger records a different line than the one in the source file.

3. Do you see a correlation between the highlight in the editor and the statement that should be highlighted?

 

Constantin

0 Kudos
Message 2 of 8
(4,871 Views)

Hi ConstantinP,

 

1. I know this behaviour since old LabWindows CVI days, because of that i build my project every time before i execute it.

2. No, we don't use line directives

3. No, i can't see any any correlation. I tried to follow the highlighted lines and compared it to the happenings in the watch expression window, but no chance.

0 Kudos
Message 3 of 8
(4,864 Views)

Hello swenbo89,

 

Do you see this behavior only when you run the dll from Teststand?

Did you try a rebuild(Build->Rebuild menu). I’m thinking maybe CVI doesn’t see the project as modified and it doesn’t re-build it.

You could see in the Call Stack (Window->Variables and Call Stack) which function is executing when the highlight is incorrect and see at least in which function the correct line should be.

 

Constantin.

0 Kudos
Message 4 of 8
(4,859 Views)

No, i see this too, when i debug my code as an executable, and it doesn't matter if i call the debug process from Teststand or LabWindows CVI directly.

Everytime i try to debug i do a Rebuild, further i tried to clean the output and to build it again but no chance .

 

In this Call Stack Window the right function is active, but inside some functions only the steps won't be displayed in the right behaviour.

 

0 Kudos
Message 5 of 8
(4,855 Views)

Could you post a screenshot with Editor Preferences (in source editor Options>>Editor Preferences)

Also you could export all the settings so I could try to reproduce the problem with your settings. To export the settings open Start>>All Programs>>National Instruments>>LabWindows CVI 2013>>Tools>>LabWindows CVI 2013 Import-Export Settings. In the upper ring select CVI 2013 and in the bottom one select File and enter an xml file. When clicking Apply an xml file with the registry settings is generated.

If it happens only with some files, could you provide a simple file that exhibits the problem?

Constantin

0 Kudos
Message 6 of 8
(4,850 Views)

@Constantin--P wrote:

 

1. Was the code modified since it was last time built? If it was modified then the highlight corresponds to the location when the code was last built.

 

I have seen that behavior when I mistakenly edit the source while the debugger is running.

0 Kudos
Message 7 of 8
(4,839 Views)

Hi, svenbo89—

 

You mentioned in an earlier post that within one source file, this behavior only happens for certain functions. If you take those functions out of the source file and try to debug them in a simpler project, does the debugger still behave this way? 

 

Does this always happen on the same functions, or is it random?

 

Do you set breakpoints at run time?

 

Thanks,

Daniel Dorroh
National Instruments
0 Kudos
Message 8 of 8
(4,705 Views)