Get debug messages from LabVIEW applications

Debug String VI iconDid you ever had to know for debugging reasons what your compiled LabVIEW application actually is doing? The answer is probably yes.

LabVIEW itself comes with a debugging interface. With your development environment you can connect to your exe, even if it runs on a remote system. Unfortunately this is not an option in many cases because you can not connect to the system running your LabVIEW build application or you simply want short information about certain occurrences. Sure, you can create your own event logger telling you at what point your program is. This is tedious so you might be interested in my easy answer for the problem.

Getting informative messages out of your application is a cinch because Windows comes with a debugging interface. Two simple things are required to use it: a LabVIEW VI that writes strings to the interface and a program to read the messages on the Windows degug interface.

The VI needs to write your debug message to the function OutputDebugStringA of Windows kernel32.dll. That’s it.
Debug String VI blockdiagram snippet

The program to read the Windows debug interface comes from Microsoft and is called DebugView. It is free. I spare the link, just search for it. DebugView is easy to use and offers handy features like filtering and saving the log.
DebugView Screenshot

Here is the VI (LabVIEW 2013):
ouput debug

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.