LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DebugView with Labwindows CVI ?

Hi all,

I have to PC (under Seven Pro 64bits) with Labwindows 2012 installed on both.

I wrote a little program which send a debug message when I click on a button.

The code is {DebugPrintf("....")} very simple of course !!!

But I don't understand why I can use correctly "DbgView.exe" on a PC but not on the other ?

On one I see correctly debug message but on the other one nothing in the log window.

For information : Settings in DbgView.exe are same on both PC and I use only my Program in release mode.

 

An other information : I can see messages in labindows CVI "debug window"

 

Could you help me ?

 

Best Regards,

 

Nicolas

0 Kudos
Message 1 of 5
(2,869 Views)

Hi Nicolas,

 

Would you mind sharing your code so that I can try and reproduce the issue you are having?

With LabWindows CVI, some debug features are no longer available when you compile your exe as a release instead of debug.

 

Best regards.

0 Kudos
Message 2 of 5
(2,834 Views)

Hello keloueldrhiri,

Thanks for your reply.

 

Here's my code : (In red text, function which send debug message)

 

int CVICALLBACK Cbk_Ok_Button (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	int x = 0;
	
	switch (event)
	{
		case EVENT_COMMIT:
			
			for(x;x<10;x++)
			{
				DebugPrintf("Hello : %d\n",x);
				Delay(1);
			}

			break;
	}
	return 0;
}

As you can see in my first message, I already compiled my code in release and used labwindows/cvi debug tools with success.

But my target is to use only my "Executable compiled by Labwindow/cvi in release" and the debugger "DbgView.exe".

I don't understand why on one PC it works correctly and not on the other one, knowing that I check that debbuger parameters are identical on the both PC ?

 

Thanks for your help,

 

Best Regards,

 

Nicolas

 

 

 

0 Kudos
Message 3 of 5
(2,828 Views)

I too have observed sometimes that DebugPrintf outputs are not seen by DebugView and resolved using OutputDebugString () Win32 function which is indeed trapped by the utility. I was never able to understand why this happens on some machines and not on others, but I really had no time to investigate.

The help for DebugPrintf function states: If another development environment is debugging the program, the output can appear in debugging output window of that development environments which seems to admit the possibility that the output does not appear at all, but gives no clue on why it would not.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 5
(2,824 Views)

Hello Roberto,

Thank you for your reply.
I will test with this function and I will keep you informed.

 

Best Regards,

 

Nicolas

 

0 Kudos
Message 5 of 5
(2,814 Views)